Finding indices of certain values

조회 수: 2 (최근 30일)
Anurag Gupta
Anurag Gupta 2020년 11월 1일
댓글: Anurag Gupta 2020년 11월 1일
I have a matrix A=[ 1 2; 4 5; 0 0; 7 8;0 0]
i want to find the row number wherein both the coloumns are 0 0
i tried [ r,~] =find(A==[0 0])
but it returns me 3 5 3 5 whereas the output for me should be just 3 5
it would be great if you can spare some time and help me out with this.

채택된 답변

madhan ravi
madhan ravi 2020년 11월 1일
find(all(A == 0, 2))
  댓글 수: 1
Anurag Gupta
Anurag Gupta 2020년 11월 1일
Sorry mate if the tag irritates you. anyways thanks for answering.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Pulsed Waveforms에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by