how can we calculate count of specific group in a row
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
abdul wahab aziz
il 22 Ago 2016
Commentato: abdul wahab aziz
il 22 Ago 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 Commenti
Risposta accettata
Azzi Abdelmalek
il 22 Ago 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)]
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Resizing and Reshaping Matrices in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!