how can we calculate count of specific group in a row
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
abdul wahab aziz
le 22 Août 2016
Commenté : abdul wahab aziz
le 22 Août 2016
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 commentaires
Réponse acceptée
Azzi Abdelmalek
le 22 Août 2016
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)]
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Resizing and Reshaping Matrices dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!