MATLAB Answers

0

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

Log in to comment.

1 Answer

Answer by Loginatorist on 20 Nov 2012
Edited by Loginatorist 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

Log in to comment.


Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today