How to do distance formula
3 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(1 个)
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Structural Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!