Finding distance between two points from 3D coordinates?

63 vues (au cours des 30 derniers jours)
HC1992
HC1992 le 6 Fév 2018
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.

Réponses (2)

Jan
Jan le 6 Fév 2018
Modifié(e) : Jan le 15 Fév 2018
sqrt(sum((A - B) .^ 2))
or:
norm(A - B)

Muhammd
Muhammd le 14 Mar 2023
P1=[x,y,z] P2=[x1,y1,z1] D=norm(P1-P2)

Catégories

En savoir plus sur Guidance, Navigation, and Control (GNC) dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by