Effacer les filtres
Effacer les filtres

Reorder symmetric adjacency matrix

2 vues (au cours des 30 derniers jours)
Hans van der Horn
Hans van der Horn le 12 Juin 2022
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

Réponses (1)

Bruno Luong
Bruno Luong le 12 Juin 2022
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 commentaire
Hans van der Horn
Hans van der Horn le 12 Juin 2022
That’s easier than I thought, thanks!

Connectez-vous pour commenter.

Catégories

En savoir plus sur Matrices and Arrays dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by