Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Point at which max occurs

Asked by aswathy on 20 Nov 2012

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]

0 Comments

aswathy

Products

No products are associated with this question.

1 Answer

Answer by Matt Fig on 20 Nov 2012
Edited by Matt Fig on 20 Nov 2012
Accepted answer

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])

0 Comments

Matt Fig

Contact us