Findind repeated elements in a cell of a Table and report number of cases
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
KSSV
2021 年 5 月 18 日
Let a be column.
xbins = unique(a);
[counts,centres] = hist(a,xbins);
R = [centres counts']
参考
カテゴリ
Help Center および File Exchange で Shifting and Sorting Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!