Plot a 2D ,with accordance to the distance between the points
2 次查看(过去 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!