Find linear indices between two matrices

3 ビュー (過去 30 日間)
khadouja kraouu
khadouja kraouu 2022 年 6 月 9 日
コメント済み: khadouja kraouu 2022 年 6 月 9 日
Greetings everyone. I have two matrices A and B with the same size (128) and each one of them has a random values (1 and 2), so I need to find a table that contains the linear indices of the elements of matrice A with values higher than the elements of the same indices in matrice B.
Any help? Thanks in advance.

採用された回答

Mitch Lautigar
Mitch Lautigar 2022 年 6 月 9 日
If A and B are the same size, and you are only attempting to find where the values of A is greater than B, use the following logic.
%x is the indeces of where A is greater than B
%A is the base array you wish to find the indeces of
%B is the comparison array to use against A
x = find(A > B);
  1 件のコメント
khadouja kraouu
khadouja kraouu 2022 年 6 月 9 日
OKK thank u so much.

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by