Finding rows in matrix containing numbers from vector

I have a matrix and a row vector
M = [1 4 3; 1 2 5; 3 2 1; 5 3 4; 2 3 5];
A = M(1,:);
Now, I wish to find the indices of all rows in M containing at least two of the values in A. As such, the desired output is
index = [1; 3; 4];
How would I do that?

 採用された回答

その他の回答 (0 件)

カテゴリ

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

製品

リリース

R2018b

質問済み:

2018 年 11 月 24 日

回答済み:

2018 年 11 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by