How to check if any row has 0?
18 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Beibit Sautbek
el 8 de Ag. de 2016
Respondida: Azzi Abdelmalek
el 8 de Ag. de 2016
If I have matrix A=
0 0 0 5
1 1 4 3
1 3 4 5
2 0 0 5
I need to find that rows which has 0.
A result should show rows 1 and 4, which there are some zeros.
Could anyone help me?!
0 comentarios
Respuesta aceptada
Más respuestas (1)
Azzi Abdelmalek
el 8 de Ag. de 2016
A=[0 0 0 5;1 1 4 3;1 3 4 5;2 0 0 5]
out=find(~all(A,2))
0 comentarios
Ver también
Categorías
Más información sobre Resizing and Reshaping Matrices 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!