Using unique-function - show amount of times unique value was found
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hey,
I am using:
[C, ia, ic] = unique(Location);
Now I get a list of unique Locations in Location but am actually looking for the amount of times each location is in there. E.g.:
C Times
Location 1 5
Location 2 8
Location 3 2
etc..
Is there a way to do that?
thanks for your help!
0 Commenti
Risposta accettata
KSSV
il 3 Mag 2021
REad about hist.
xbins = unique(Location);
[counts,centres] = hist(Location,xbins);
R = [centres counts]
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Histograms in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!