How to get the unique and NON-ZERO rows of a matrix?
16 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Homayoon
el 12 de Jul. de 2016
Comentada: Homayoon
el 12 de Jul. de 2016
Dear Experts,
I do not know how to get the unique and non-zero rows of a matrix, can you help me to figure it out please?
For example,
a = [1 2 3
0 0 0
2 4 6]
While the following command gives me the unique rows but it includes the Zero rows as well that I do not want to have in my desired output
unique(a,'rows')
my desired output has to be as :
[1 2 3
2 4 6]
thanks for helps.
0 comentarios
Respuesta aceptada
Más respuestas (1)
Ver también
Categorías
Más información sobre Creating and Concatenating 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!