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.

Respuestas (2)

Jan
Jan el 6 de Feb. de 2018
Editada: Jan el 15 de Feb. de 2018
sqrt(sum((A - B) .^ 2))
or:
norm(A - B)

Categorías

Más información sobre Guidance, Navigation, and Control (GNC) en Centro de ayuda y File Exchange.

Preguntada:

el 6 de Feb. de 2018

Respondida:

el 14 de Mzo. de 2023

Community Treasure Hunt

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

Start Hunting!

Translated by