Matlab to realize network topology and complement map

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.