a=[1 2 3;5 8 9 ;5 6 4;1 2 5] I want to check whether a contains [5 6 4] in any row or not. How can I do this?

 채택된 답변

KSSV
KSSV 2017년 11월 1일
편집: KSSV 2017년 11월 1일

1 개 추천

Read about ismember
a=[1 2 3;5 8 9 ;5 6 4;1 2 5] ;
b = [5 6 4] ;
idx = find(ismember(a,b,'rows'))

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

제품

태그

질문:

2017년 11월 1일

편집:

2017년 11월 1일

Community Treasure Hunt

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

Start Hunting!

Translated by