calculate an angle and distance from three points
显示 更早的评论
hi...How to calculate an angle and distance from three points? ex P1 = (x=2, y=50) P2 = (x=9, y=40) P3 = (x=5, y=20)
1 个评论
Marta Salas
2014-3-10
You can not define an angle and a distance between 3 points. Do you mean by pairs of those 3 points?
采纳的回答
更多回答(1 个)
Marta Salas
2014-3-11
The distance can be calculated as the norm of the vector between two points:
P1 = [2; 50], P2 = [9; 40], P3 = [5; 20]
d1 = norm(P2-P1);
d2 = norm(P3-P1);
distances =[d1; d2]
类别
在 帮助中心 和 File Exchange 中查找有关 Simulink 3D Animation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!