storing indices of some entries in a matrix
조회 수: 2 (최근 30일)
이전 댓글 표시
I want to store the index of all the entries with value 5 in a matrix. is there an inbuilt function for it.
댓글 수: 0
답변 (1개)
Mischa Kim
2014년 4월 20일
편집: Mischa Kim
2014년 4월 20일
Ryan, use
[r c] = find(data==5)
r and c are the row and column indices of all data entries equal to 5.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!