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
Walter Roberson 2017년 5월 16일

0 개 추천

G = graph( YourMatrix(:,1), YourMatrix(:,2) );
and then if you still need it,
adjacency(G)

카테고리

도움말 센터File Exchange에서 Networks에 대해 자세히 알아보기

질문:

2017년 5월 16일

답변:

2017년 5월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by