How to eliminate duplicate rows in an array without changing their orders?
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Cantor Set
am 17 Feb. 2020
Kommentiert: Cantor Set
am 17 Feb. 2020
I have an array:
DOM =
[1 1 1 0;
1 1 1 0;
0 1 0 0;
0 1 0 0;
1 0 1 0;
1 0 1 0]
I need to eliminate the dublicate rows but without changing the order of the rows in Dom. I s there a MATLAB function for doing so or do I have to write a loop?
I tried
D=unique(DOM, 'rows');
D =
0 1 0 0
1 0 1 0
1 1 1 0
Thanks
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Operators and Elementary Operations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!