Program to calculate Distance between points and fixed point

3 visualizaciones (últimos 30 días)
I have three points A(000),B(111),C(222) and one fixed position P(333). I want make program to calculate the distance from A, B and C to point P using for loops. Appreciate if have some idea?

Respuesta aceptada

Matt J
Matt J el 5 de Ag. de 2021
Use pdist2
distances=pdist2([A;B;C],P)
  4 comentarios
Yadu Bhusal
Yadu Bhusal el 5 de Ag. de 2021
Thank you. And can angle made by A,B,C to P be calculated using these distances and these points or distances?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by