Plot a 2D ,with accordance to the distance between the points
조회 수: 3 (최근 30일)
이전 댓글 표시
I have two array and distance between the corresponding points are known, I wish to plot the points such that it is arranged in accordance with the distance between them.
Please help me in this regard.
채택된 답변
Hiro Yoshino
2020년 12월 15일
I hope I can give you some guide:
s = A(:,1);
t = A(:,2);
weight = A(:,3);
G = graph(s,t,weight);
plot(G, 'EdgeLabel', G.Edges.Weight);
You should take a look at "graph" in the documentation.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!