Extract 5 highest value of a vector

1 vue (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)

Catégories

En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by