필터 지우기
필터 지우기

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 CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by