How to build an adjacency matrix?
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Isidro Pantoja-Gomez
el 16 de Mayo de 2017
Respondida: Walter Roberson
el 16 de Mayo de 2017
I have a matrix of thirty rows and 2 columns how do I put this data into an adjacency matrix of 12x12. So that the new matrix has zeros where there is no point an a 1 where there is a match in the first matrix.
0 comentarios
Respuestas (1)
Walter Roberson
el 16 de Mayo de 2017
G = graph( YourMatrix(:,1), YourMatrix(:,2) );
and then if you still need it,
adjacency(G)
0 comentarios
Ver también
Categorías
Más información sobre Graph and Network Algorithms en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!