how to find out the index at which max occurs in a series of data in matlab??
these are my data [1 5 6 7 8 9 10 12 2 7 8 11 5]

 Respuesta aceptada

Matt Fig
Matt Fig el 20 de Nov. de 2012
Editada: Matt Fig el 20 de Nov. de 2012

2 votos

It is always a good idea to read the doc for any such question:
doc max
docsearch('maximum value')
The two output call to the MAX function gives you what you need.
[maxval,index] = max([1 5 6 7 8 9 10 12 2 7 8 11 5])

Más respuestas (0)

Categorías

Etiquetas

Preguntada:

el 20 de Nov. de 2012

Comentada:

el 11 de En. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by