Info

此问题已关闭。 请重新打开它进行编辑或回答。

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

1 次查看(过去 30 天)
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)

回答(0 个)

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by