Input array has 16 numbers.I need to find 4 least numbers from the given array. using 'min' command will get you a single answer only. What technique can be used to achieve the effective answer.

 채택된 답변

Amit
Amit 2014년 1월 22일
편집: Amit 2014년 1월 22일

0 개 추천

Lets say your array A (a mX1 and 1Xm) matrix (I am assuming). Then,
Y = sort(A);
val = Y(1:4);

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

제품

태그

질문:

2014년 1월 22일

편집:

2014년 1월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by