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.

Réponses (3)

Star Strider
Star Strider le 23 Août 2012

0 votes

Another option from the File Exchange is Peak Fitter.
Image Analyst
Image Analyst le 23 Août 2012

0 votes

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

Question posée :

le 23 Août 2012

Community Treasure Hunt

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

Start Hunting!

Translated by