How to select the indexes of maximum 3 values in the array without sorting?

1 visualización (últimos 30 días)
Find the index of the largest 3 elements?

Respuesta aceptada

Walter Roberson
Walter Roberson el 20 de Mzo. de 2014
"for" loop.
  2 comentarios
navya
navya el 20 de Mzo. de 2014
could you please explain me with an example??
Walter Roberson
Walter Roberson el 20 de Mzo. de 2014
for K = 1 : length(x)
if x(K) > 5
disp(K)
end
end
the above example does not try to find any maximums, it just shows how you can create a loop that examines values in the array and does something conditionally.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Multidimensional Arrays 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