how can we calculate count of specific group in a row
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
abdul wahab aziz
el 22 de Ag. de 2016
Comentada: abdul wahab aziz
el 22 de Ag. de 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 comentarios
Respuesta aceptada
Azzi Abdelmalek
el 22 de Ag. de 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)]
Más respuestas (0)
Ver también
Categorías
Más información sobre Logical en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!