How to find 4 minimum values from an array?

4 ビュー (過去 30 日間)
Sivakumaran Chandrasekaran
Sivakumaran Chandrasekaran 2014 年 1 月 22 日
編集済み: Amit 2014 年 1 月 22 日
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 日
Lets say your array A (a mX1 and 1Xm) matrix (I am assuming). Then,
Y = sort(A);
val = Y(1:4);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOperators and Elementary Operations についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by