Program to calculate Distance between points and fixed point

1 次查看(过去 30 天)
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?

采纳的回答

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

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by