Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

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

1 visualizzazione (ultimi 30 giorni)
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)

Risposte (0)

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by