Can compare between vector and array

Hello,
Can matching between vector and array where I have vector and large size of array, for example:
x with length 5 :x=[1 2 3 4 5];
A with size 3*5 A=[2 3 4 6 7; 10 11 1 2 3; 1 2 3 4 5];
Thanks

1 件のコメント

James Tursa
James Tursa 2022 年 8 月 17 日
What do you want for output? A list of row numbers in A that match x? Or ...?

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

 採用された回答

James Tursa
James Tursa 2022 年 8 月 17 日
編集済み: James Tursa 2022 年 8 月 17 日

0 投票

Does this do what you want? Finds the row numbers in A that match x.
find(all(A==x,2))

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeResizing and Reshaping Matrices についてさらに検索

製品

リリース

R2022a

質問済み:

2022 年 8 月 17 日

コメント済み:

2022 年 8 月 17 日

Community Treasure Hunt

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

Start Hunting!

Translated by