Effacer les filtres
Effacer les filtres

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

5 vues (au cours des 30 derniers jours)
Emma
Emma le 24 Nov 2012
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?

Réponse acceptée

Matt Fig
Matt Fig le 24 Nov 2012
Modifié(e) : Matt Fig le 24 Nov 2012
A = rand(3)>.5;
[I,J] = find(A) % I is the rows, J is the cols.

Plus de réponses (0)

Catégories

En savoir plus sur Matrices and Arrays dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by