how can we calculate count of specific group in a row
1 回表示 (過去 30 日間)
古いコメントを表示
abdul wahab aziz
2016 年 8 月 22 日
コメント済み: abdul wahab aziz
2016 年 8 月 22 日
i have a matric
3 2 5,
3 2 5,
4 2 5,
4 2 5,
4 2 5,
i need output like this 3 2 5 *2*- where 2 and 3 of times occured
4 2 5 *3*
0 件のコメント
採用された回答
Azzi Abdelmalek
2016 年 8 月 22 日
A=[3 2 5,
3 2 5,
4 2 5,
4 2 5,
4 2 5]
[ii,jj,kk]=unique(A,'rows','stable')
out=[ii,accumarray(kk,1)]
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Resizing and Reshaping Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!