MATLAB Answers

Finding peaks in a data set

10 views (last 30 days)
Christopher on 23 Oct 2013
Edited: Wayne King on 23 Oct 2013
Hello all,
I have some data and need a way to reliablly find the peaks of the data set. The picture below shows the plotted data. There are 19 peaks on each side of the data for a total of 38 peaks. I have tried using the findpeaks function, however it seems to pick up random spots in the data. I am consisently trying to find all 38 peaks.


Show 1 older comment
Image Analyst
Image Analyst on 23 Oct 2013
By the way, you can simply just hit alt-PrintScreen (to copy the active window into the clipboard) and then go to and type control-V to paste in the screenshot. You don't actually have to take a picture with a camera and then upload it.
Azzi Abdelmalek
Azzi Abdelmalek on 23 Oct 2013
How many peaks did you find with findpeaks ?
dpb on 23 Oct 2013
And, I suppose while we're asking, what options did you use/have you tried to rid the spurious peaks from the results???? findpeaks does have quite a lot of flexibility in what it thinks is a qualifying peak depending on the inputs given.

Sign in to comment.

Answers (1)

Wayne King
Wayne King on 23 Oct 2013
Edited: Wayne King on 23 Oct 2013
I would first ensure you are using MathWorks' findpeaks(). If you enter
>>which findpeaks
do you get something back like
If so, then as dpb suggests, I would use one or more of the options in findpeaks() like
for example.


Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by