Can compare between vector and array
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello,
Can matching between vector and array where I have vector and large size of array, for example:
x with length 5 :x=[1 2 3 4 5];
A with size 3*5 A=[2 3 4 6 7; 10 11 1 2 3; 1 2 3 4 5];
Thanks
댓글 수: 1
James Tursa
2022년 8월 17일
What do you want for output? A list of row numbers in A that match x? Or ...?
채택된 답변
James Tursa
2022년 8월 17일
편집: James Tursa
2022년 8월 17일
Does this do what you want? Finds the row numbers in A that match x.
find(all(A==x,2))
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!