How to get first 3 maximum number in a matrix
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Suppose I have a matrix m:
m = [7;1;4;4;12;2;6;10;2];
I want to find first 3 maximum in matrix m, means like:
n = [7;12;10]; % sorting is not issue
0 comentarios
Respuesta aceptada
Más respuestas (2)
Matt J
el 5 de Nov. de 2014
Bruno Luong took the trouble to make a fast MEX implementation
0 comentarios
Ver también
Categorías
Más información sobre Shifting and Sorting Matrices 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!