M-File Help: peak | View code for peak |
Find peaks in vector
yp = peak(y, options) are the values of the maxima in the vector y.
[yp,i] = peak(y, options) as above but also returns the indices of the maxima in the vector y.
[yp,xp] = peak(y, x, options) as above but also returns the corresponding x-coordinates of the maxima in the vector y. x is the same length of y and contains the corresponding x-coordinates.
'npeaks', N | Number of peaks to return (default all) |
'scale', S | Only consider as peaks the largest value in the horizontal range +/- S points. |
'interp', N | Order of interpolation polynomial (default no interpolation) |
'plot' | Display the interpolation polynomial overlaid on the point data |
© 1990-2012 Peter Corke.