Finding distance between two points from 3D coordinates?
显示 更早的评论
If I have two points in 3d, A = [1579.4 51.2 279]
B = [1674.4 86.7 249]
these are (x, y, z) coordinates in mm, What is the easiest way to compute the distance (mm) between these two points in matlab,
Thanks.
回答(2 个)
sqrt(sum((A - B) .^ 2))
or:
norm(A - B)
Muhammd
2023-3-14
0 个投票
P1=[x,y,z] P2=[x1,y1,z1] D=norm(P1-P2)
类别
在 帮助中心 和 File Exchange 中查找有关 Guidance, Navigation, and Control (GNC) 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!