How to filter out multiple rows based on another array?

6 ビュー (過去 30 日間)
JFz
JFz 2017 年 8 月 18 日
コメント済み: JFz 2017 年 8 月 18 日
I have two arrays, a, b, one has numbers from 1,2, to 12. The other has 5 numbers 3,4, to 7. I want to filter out the rows in a that are not in b. How to do that? Thanks in advance.

採用された回答

James Tursa
James Tursa 2017 年 8 月 18 日
result = a(ismember(a,b));
  1 件のコメント
JFz
JFz 2017 年 8 月 18 日
Works! Thank you!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatched Filter and Ambiguity Function についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by