In addition to the HIST / HISTC functions, you can use ACCUMARRAY to count the occurrence (as well as a number of other aggregation operations)
counts = accumarray(list(:), 1)
%# same as: accumarray(list(:), ones(size(list(:))), [], @sum)
- TABULATE ( , , ):
t = tabulate(list)
t =
1 3 27.273
2 5 45.455
3 2 18.182
4 0 0
5 1 9.0909
, , 1 , . :
list = [3 11 12 12 13 11 13 12 12 12 11 15];
v = unique(list);
table = [v ; histc(list,v)]'
table =
3 1
11 3
12 5
13 2
15 1
( , , )