Ismembertol with 'rows' option

2 ビュー (過去 30 日間)
Umberto
Umberto 2018 年 7 月 30 日
コメント済み: Umberto 2018 年 7 月 31 日
Hello everyone,
I am looking for a way to couple the 'rows' option with a set tolerance. I have a array of points A whose coordinates form a ring. Once I rotate them by a given angle I obtain a set of points B whose coordinates should match the ones of A. My goal is to find the row j of array B which equals the row i of array A. Given that the rotation creates some numerical error I won't have perfect match, that's why I'm looking for a way which could overcome this issue.

採用された回答

Jan
Jan 2018 年 7 月 30 日
You can calculate the pairwise distance and set a threshold to accept two vectors as equal.
  1 件のコメント
Umberto
Umberto 2018 年 7 月 31 日
Thank you Jan. I also thought to use sortrows function as it is used within ismember. Still the issue is to properly rank the vector taking a set tolerance into account. Due to the big size of my array, would you recommend to use some sort of arrayfun to calculate the pairwise distance?

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOperators and Elementary Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by