필터 지우기
필터 지우기

display values in particular order

조회 수: 1 (최근 30일)
harley
harley 2013년 9월 17일
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에서 Matrices and Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by