How to build an adjacency matrix?
이전 댓글 표시
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.
답변 (1개)
Walter Roberson
2017년 5월 16일
G = graph( YourMatrix(:,1), YourMatrix(:,2) );
and then if you still need it,
adjacency(G)
카테고리
도움말 센터 및 File Exchange에서 Networks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!