Program to calculate Distance between points and fixed point

1 回表示 (過去 30 日間)
Yadu Bhusal
Yadu Bhusal 2021 年 8 月 5 日
コメント済み: Matt J 2021 年 8 月 5 日
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?
Matt J
Matt J 2021 年 8 月 5 日
No, they cannot.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by