Info

This question is closed. Reopen it to edit or answer.

Adjacency matrix .I have adjacency matrix . I want to convert it into generalise matlab code .

1 view (last 30 days)
A=[0,1,1,0,0,0,0,0,1,1;1,0,1,1,0,0,0,0,0,1;1,1,0,1,1,0,0,0,0,0;0,1,1,0,1,1,0,0,0,0;0,0,1,1,0,1,1,0,0,0;0,0,0,1,1,0,1,1,0,0;0,0,0,0,1,1,0,1,1,0;
0,0,0,0,0,1,1,0,1,1;1,0,0,0,0,0,1,1,0,1;1,1,0,0,0,0,0,1,1,0]
A = 10×10
0 1 1 0 0 0 0 0 1 1 1 0 1 1 0 0 0 0 0 1 1 1 0 1 1 0 0 0 0 0 0 1 1 0 1 1 0 0 0 0 0 0 1 1 0 1 1 0 0 0 0 0 0 1 1 0 1 1 0 0 0 0 0 0 1 1 0 1 1 0 0 0 0 0 0 1 1 0 1 1 1 0 0 0 0 0 1 1 0 1 1 1 0 0 0 0 0 1 1 0
G=graph(A)
G =
graph with properties: Edges: [20×2 table] Nodes: [10×0 table]
plot(G)

Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!