Extract 5 highest value of a vector

11 ビュー (過去 30 日間)
Francesco
Francesco 2014 年 2 月 26 日
編集済み: Andrei Bobrov 2014 年 2 月 26 日
If I want to extract the indices of the 5 highest value of a avg vector (30x1 for example) how can I do?
ind = find(avgDE... )

採用された回答

Andrei Bobrov
Andrei Bobrov 2014 年 2 月 26 日
編集済み: Andrei Bobrov 2014 年 2 月 26 日
[a,ii] = sort(avgDE,'descend');
outidx = ii(1:5);
  1 件のコメント
Francesco
Francesco 2014 年 2 月 26 日
Good, but descend! :D

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by