Findind repeated elements in a cell of a Table and report number of cases
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a table for which I would like to find how many times a certain item is repeated (for one column [variable] only at a time), and have the number of times it happens (sorted optimally). What is the way around this?
0 Kommentare
Antworten (1)
KSSV
am 18 Mai 2021
Let a be column.
xbins = unique(a);
[counts,centres] = hist(a,xbins);
R = [centres counts']
1 Kommentar
Siehe auch
Kategorien
Mehr zu Shifting and Sorting Matrices 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!