필터 지우기
필터 지우기

Finding the row/column locations of 1s in a boolean matrix

조회 수: 5 (최근 30일)
Emma
Emma 2012년 11월 24일
I have a Boolean matrix and I would like to find the row/column locations of all of the ones within the matrix. How might I go about doing this?

채택된 답변

Matt Fig
Matt Fig 2012년 11월 24일
편집: Matt Fig 2012년 11월 24일
A = rand(3)>.5;
[I,J] = find(A) % I is the rows, J is the cols.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by