フィルターのクリア

How to do distance formula

1 回表示 (過去 30 日間)
Kaden Bauernfeind
Kaden Bauernfeind 2022 年 3 月 28 日
コメント済み: VBBV 2022 年 3 月 28 日
Im trying to find the distance between 2 points on a truss and I have the length and the x and y of the nodes on the truss but what code in matlab would make this work.

回答 (1 件)

KSSV
KSSV 2022 年 3 月 28 日
If(x1,y1) and (X2,y2) are two points. To get the distance use the formula:
d = sqtrt((x2-x1)^2+(y2-y1)^2) ;
  3 件のコメント
KSSV
KSSV 2022 年 3 月 28 日
d = sqrt((x(:,2)-x(:,1)).^2+(y(:,2)-y(:,1)).^2) ;
VBBV
VBBV 2022 年 3 月 28 日
+1

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeStructural Analysis についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by