display values in particular order

1 次查看(过去 30 天)
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......

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2013-9-17
编辑:Azzi Abdelmalek 2013-9-17
use sort function
help sort
EXAMPLE
v=[2 4 1 8 0 12]
out=sort(v)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Shifting and Sorting Matrices 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by