Vertex number vertex weight value 1 2 4001 3 4502 4 3002 8 2302 9 1403 4 6004 5 2104 3105 6 2305 7 2006 7 3206 8 3407 8 1707 1608 9 2859 15010 18010 16011 14011 13012 20013 40014 19014 19015 17015 25016 14016 20 24018 20419 140
...............
S=node (:, 1) '; E=node (:, 2) '; W=node (:, 3) '; R=sparse (s,e,w); The sparse matrix representation of the% correlation matrix is r (20,20) = 0; P=biograph (r,[], ' showweights ', ' on '); % set up the Graph object Ph=view (P); % shows the individual path weights [Dist,path]=graphshortestpath (r,1,20)% for node 1 to node 20 of the shortest Path set (h.nodes (path), ' Color ', [1 0.4 0.4]); The following three statements are decorated in red with the shortest path Edges=getedgesbynodeid (h,get (h.nodes (path), ' ID ')), set (edges, ' linecolor ', [1 0 0]);
Matlab to realize network topology and complement map