フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to label edges (Euclidean distance between node coordinates) between each pair of nodes as shown in figure???? For example Euclidean distance between node 1 and node 2 ?? node 1 havig coordinates as (1.4503,2.5379) and node 2 (2.1306,1.4063) ?

1 回表示 (過去 30 日間)
Mohammad Bhat
Mohammad Bhat 2017 年 1 月 13 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日

回答 (1 件)

KSSV
KSSV 2017 年 1 月 13 日
coor = rand(3,2) ;
coor = [coor ;coor(1,:)] ;
plot(coor(:,1),coor(:,2)) ;
hold on
x = coor(1:3,1) ; y = coor(1:3,2) ;
str = strcat(num2str(x),',',num2str(y));
text(x,y,str)
read about text
  5 件のコメント
Mohammad Bhat
Mohammad Bhat 2017 年 1 月 13 日
Sir, your answer gives picture like this
Mohammad Bhat
Mohammad Bhat 2017 年 1 月 13 日
each vertex has coordinates, I want to label each edge between those nodes with euclidean distance of coresponding node coordinates ...

この質問は閉じられています。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by