How to find distaance of 2 matriks

1 回表示 (過去 30 日間)
Aulia   Pramesthita
Aulia Pramesthita 2018 年 1 月 16 日
コメント済み: Aulia Pramesthita 2018 年 1 月 16 日
Hi.
I have this data
TxPos = ...
[ 10 23.5 3.6 36
1 1 1.5 11
1.5 1.4 1.5 1.2 ];
RxPos = ...
[ 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ];
I want to calculate distance between TxPos and RxPos. But I want it to loop.
Example:
RxPos data coloumn 1 will be calculate with TxPos, so the result will be 4 distance. Next, RxPos coloumn 2 will be calculate with TxPos, so the result will be 4 distance. And same with the rest.
I don't know how to calculate it with norm so the outut from that data will be matriks 19x4
Please help, thankyou.

採用された回答

Walter Roberson
Walter Roberson 2018 年 1 月 16 日
pdist2(RxPos.',TxPos.')
Note that your RxPos has 16 columns not 19.
  1 件のコメント
Aulia   Pramesthita
Aulia Pramesthita 2018 年 1 月 16 日
oh my thank you. it works

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDetection, Range and Doppler Estimation についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by