Very useful, thanks! For my application I was trying to find the average of peaks from some experimental data that had some outliers, so I used trimmean() on the output of this function.
@mptorr - just do a max() on the output. e.g. [~,peakdata]=peakfinder(x0) ... max(peakdata)
@Ali - there is an option for this in peakfinder. Make the 4th input argument -1 to find minimums (type "help peakfinder" into the command window for more info)
30 Dec 2013
Quickly finds local maxima (peaks) or minima (valleys) in a noisy signal.