Findgroups, order of unique values in an array
16 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
ardeshir moinian
am 3 Feb. 2021
Kommentiert: Stephen23
am 4 Feb. 2021
Hi,
I am trying to use "findgroups" in order to later split my data into different groups. But the order at which the groups are seperated is important for me. Using "findgroups" the order of groups is not "stable". How can I change that?
I did this:
[G ID]=findgroups(labels_all);
But
ID
doesn't come in that same order as
labels_all
I know that in unique, stable can fix this
q=unique((labels_all),'stable')
here q will be in order that unique values occur in labels_all.
Thank you!
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Preprocessing 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!