find equal element rows in a matrix
Mostrar comentarios más antiguos
I have a matrix, in witch some rows have the same elements in different order. I want to keep only one row that has a specific set of elements. for example, if I have:
1 3
2 5
3 1
2 3
5 2
I would like to convert this matrix to:
1 3
2 5
2 3
anyone?
1 comentario
Terence Etchells
el 7 de Abr. de 2023
which
Respuestas (1)
Adam
el 7 de Ag. de 2014
unique( sort( a, 2 ), 'rows' )
assuming a is your input array
Categorías
Más información sobre Resizing and Reshaping Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!