Determining how many "peaks" in a graph

Hello community,
I currently have two different types of vectors, where the values in the vector represent the y-value of the plot and the x-value is taken from the index of that respective value.
When plotted, these vectors would either result in a graph with one peak, or two peaks. I am trying to find a way to determine how many "peaks" there are.
Below I have attached two examples of graph I have.

Answers (3)

Star Strider
Star Strider on 23 Aug 2012
Another option from the File Exchange is Peak Fitter.
Image Analyst
Image Analyst on 23 Aug 2012
Here's a review of several peak finding algorithms: http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2631518/
Here's another peak detection script:
% Eli Billauer, 3.4.05 (Explicitly not copyrighted). % http://billauer.co.il/peakdet.html % This function is released to the public domain; Any use is allowed.

Tags

Asked:

on 23 Aug 2012

Community Treasure Hunt

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

Start Hunting!