フィルターのクリア

Reorder symmetric adjacency matrix

2 ビュー (過去 30 日間)
Hans van der Horn
Hans van der Horn 2022 年 6 月 12 日
コメント済み: Hans van der Horn 2022 年 6 月 12 日
Dear all, I’d like to reorder a 10x10 adjacency matrix, based on node order. So for example, I’d like node 8 to be the first etc. Does anyone know a way to do this? Thanks! Hans

回答 (1 件)

Bruno Luong
Bruno Luong 2022 年 6 月 12 日
p is your order, A is the adjadcent matrix
p = [8, 9, 10, 1, 2, 3, 4, 5, 6, 7];
Areorder = A(p,p)
  1 件のコメント
Hans van der Horn
Hans van der Horn 2022 年 6 月 12 日
That’s easier than I thought, thanks!

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by