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
James Tursa 2022년 8월 17일
What do you want for output? A list of row numbers in A that match x? Or ...?

댓글을 달려면 로그인하십시오.

 채택된 답변

James Tursa
James Tursa 2022년 8월 17일
편집: James Tursa 2022년 8월 17일

0 개 추천

Does this do what you want? Finds the row numbers in A that match x.
find(all(A==x,2))

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

제품

릴리스

R2022a

질문:

2022년 8월 17일

댓글:

2022년 8월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by