Extract 5 highest value of a vector

1 visualización (últimos 30 días)
Francesco
Francesco el 26 de Feb. de 2014
Editada: Andrei Bobrov el 26 de Feb. de 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... )

Respuesta aceptada

Andrei Bobrov
Andrei Bobrov el 26 de Feb. de 2014
Editada: Andrei Bobrov el 26 de Feb. de 2014
[a,ii] = sort(avgDE,'descend');
outidx = ii(1:5);

Más respuestas (0)

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by