Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- graphMatrix = {{0, 0.140892, 0.298153, 1.13827, 1.27866, 1.4}, {0.140892, 0,
- 0.167897, 1.16492, 1.3422, 1.49614}, {0.298153, 0.167897, 0,
- 1.13035, 1.35045, 1.54743}, {1.13827, 1.16492, 1.13035, 0, 0.375184,
- 0.773562}, {1.27866, 1.3422, 1.35045, 0.375184, 0, 0.412249}, {1.4,
- 1.49614, 1.54743, 0.773562, 0.412249, 0}};
- graph = Graph[WeightedAdjacencyGraph[graphMatrix],
- VertexLabels -> "Name"];
- tree = Graph[FindSpanningTree[graph], VertexLabels -> "Name"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement