Extract 5 highest value of a vector

2 vues (au cours des 30 derniers jours)
Francesco
Francesco le 26 Fév 2014
Modifié(e) : Andrei Bobrov le 26 Fév 2014
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... )

Réponse acceptée

Andrei Bobrov
Andrei Bobrov le 26 Fév 2014
Modifié(e) : Andrei Bobrov le 26 Fév 2014
[a,ii] = sort(avgDE,'descend');
outidx = ii(1:5);
  1 commentaire
Francesco
Francesco le 26 Fév 2014
Good, but descend! :D

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by