I have a matrix that has 60,000+ rows and there are duplicate of rows in this matrix example: [1 2 3; 1 2 3; 2 3 3; 2 3 3] How can I get a matrix that just has [1 2 3; 2 3 3]?

 Akzeptierte Antwort

Cedric
Cedric am 13 Okt. 2017
Bearbeitet: Cedric am 13 Okt. 2017

0 Stimmen

A_uniqueRows = unique( A, 'rows' ) ;
or
A_uniqueRows = unique( A, 'rows', 'stable' ) ;
if you don't want the output to be sorted.

Weitere Antworten (0)

Kategorien

Gefragt:

am 13 Okt. 2017

Bearbeitet:

am 13 Okt. 2017

Community Treasure Hunt

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

Start Hunting!

Translated by