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 件)

カテゴリ

製品

タグ

編集済み:

2014 年 1 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by