Borrar filtros
Borrar filtros

find the index of the rows that have all 1

17 visualizaciones (últimos 30 días)
pamela sulis
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?

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 7 de Abr. de 2016
Editada: Azzi Abdelmalek el 7 de Abr. de 2016
idx=find(all(A,2))

Más respuestas (0)

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by