フィルターのクリア

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 Center および File ExchangeMatrices and Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by