I have a vector A = [1 3 5 4 2]. I have a vector of the form B = [2 4 5]. How do I check if all the values in vector B are in vector A?

2 ビュー (過去 30 日間)
I have a vector A = [1 3 5 4 2]. I have a vector of the form B = [2 4 5]. How do I check if all the values in vector B are in vector A?

採用された回答

Adam Danz
Adam Danz 2018 年 7 月 23 日
編集済み: Adam Danz 2018 年 7 月 23 日
ismember()
all(ismember())

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by