A command like "unique" for matrices?
Ältere Kommentare anzeigen
Hi guys,
Is there any command like "unique" for matrices?
I have a major matrice (mother) , and that involve few minor matrices, some of are repeated randomly
i'm looking for a command for delete repeated ones and do something like unique ,
anybody knows how?
3 Kommentare
madhan ravi
am 23 Apr. 2019
Well without illustration it’s not clear , sounds like unique is what you need. Better an example with an explicit example would be great.
Andrei Bobrov
am 23 Apr. 2019
Please post an example of your matrix and what you want to receive.
Amy Hs
am 23 Apr. 2019
Akzeptierte Antwort
Weitere Antworten (1)
Andrei Bobrov
am 23 Apr. 2019
1 Stimme
A=[1;2;3];
C=[4;5;6];
M = [repmat(A,2,1);C];
out = reshape(unique(reshape(M,3,[])','rows','stable')',[],1);
1 Kommentar
Amy Hs
am 23 Apr. 2019
Kategorien
Mehr zu Programming finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!