Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2014
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. graphMatrix = {{0, 0.140892, 0.298153, 1.13827, 1.27866, 1.4}, {0.140892, 0,
  2. 0.167897, 1.16492, 1.3422, 1.49614}, {0.298153, 0.167897, 0,
  3. 1.13035, 1.35045, 1.54743}, {1.13827, 1.16492, 1.13035, 0, 0.375184,
  4. 0.773562}, {1.27866, 1.3422, 1.35045, 0.375184, 0, 0.412249}, {1.4,
  5. 1.49614, 1.54743, 0.773562, 0.412249, 0}};
  6.  
  7. graph = Graph[WeightedAdjacencyGraph[graphMatrix],
  8. VertexLabels -> "Name"];
  9. tree = Graph[FindSpanningTree[graph], VertexLabels -> "Name"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement