Getting the 3 lowest values in a vector Matlab
Mostrar comentarios más antiguos
How would I be able to get the 3 minimum values from a vector of values, starting from the lowest one to the higher values?
a = [12,3,9, 5.6, 9, 10, 7]
Expected Output:
[3, 5.6, 7]
Respuestas (1)
a = [12,3,9, 5.6, 9, 10, 7];
b = mink(a, 3)
Categorías
Más información sobre Shifting and Sorting Matrices en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!