display values in particular order
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
i have a code that displays the minimum value. I want to display the rest of the values from lowest to highest value, how do i do this.
RMSVALUES = [rms_a, rms_b, rms_c, rms_d, rms_e, rms_f]
MINRMS = min(RMSVALUES)
%
if MINRMS==rms_a
fprintf('rms_a is best match,');
end
if MINRMS==rms_b
fprintf('rms_b is best match,');
end
% etc......
0 comentarios
Respuesta aceptada
Azzi Abdelmalek
el 17 de Sept. de 2013
Editada: Azzi Abdelmalek
el 17 de Sept. de 2013
use sort function
help sort
EXAMPLE
v=[2 4 1 8 0 12]
out=sort(v)
0 comentarios
Más respuestas (0)
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!