find the index of the rows that have all 1
12 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
pamela sulis
el 7 de Abr. de 2016
Editada: Azzi Abdelmalek
el 7 de Abr. de 2016
Hi, I have a matrix
A= [ 0 0 0 0 0
0 1 1 1 1
1 1 1 0 0
0 0 0 0 1
0 0 0 1 0
1 1 1 1 1
0 1 1 1 1
0 1 1 1 0
0 0 1 1 1
1 1 1 1 1
0 0 0 1 0]
I want to find the index of the rows that have all 1, can you help me?
0 comentarios
Respuesta aceptada
Azzi Abdelmalek
el 7 de Abr. de 2016
Editada: Azzi Abdelmalek
el 7 de Abr. de 2016
idx=find(all(A,2))
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Matrix Indexing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!