필터 지우기
필터 지우기

Dear all: I have a 5*2 matrix. i want to find out the row and column of a special value.let A=[1 2;4 5; 1 8;2 6;9 7] I want to find the row and column of 9 and 7.how can i do this?

조회 수: 2 (최근 30일)
Dear all: I have a 5*2 matrix. I want to find out the row and column of a special value.let A=[1 2;4 5; 1 8;2 6;9 7] I want to find the row and column of 9 and 7 toghether.how can i do this?

채택된 답변

Thorsten
Thorsten 2016년 6월 21일
If your matrix has the same number of columns as your vector, as in your example, you just have to find the row:
r = find(ismember(A, [9 7], 'rows'))

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by