How to filter out multiple rows based on another array?

조회 수: 1 (최근 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));

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matched 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