# Finding specific peaks in noisy data

6 views (last 30 days)
Tapan Goel on 24 Sep 2020
Answered: Dana on 24 Sep 2020
I have multiple plots (~5000) that look like the ones below and I only want to know the (x,y) coordinates of the peaks marked in red. The consistant feature in the plots is that there is a deep valley between the peaks I'm interested in but due to noise, there are smaller valleys around the peaks. This means that when I try to use the findpeaks feature with the MinPeakProminance argument, I still end up getting multiple peaks. Any advice would be really useful. Thanks in advance :)
If its any help, the plots are a sequence of time series images of the shape of a worm - the x coordinate is the arclength of the worm and the y coordinate is the width of the worm at that arclength

Dana on 24 Sep 2020
This exercise looks like it involves some subejctivity. For example, in the second plot, the "peak" on the left isn't really a peak at all, it's more of a plateau. Also, the only thing that distinguishes the peak near 190 from the ones near 290 is their relative sizes (which isn't even a precisely defined concept). So if you're going to do this, you need to figure out some measure of the "size" of a peak, and then pick a cut-off threshold, where you only look at peaks above the threshold. Needless to say, since it's a subjetive exercise, you need to figure out for yourself what the best way to do that is for your exercise.
That said, if I was doing this, I'd probably just play around with the different findpeaks options. You tried one of those options, but there are others (i.e., MinPeakHeight, MinPeakWidth, MaxPeakWidth, Threshold, MinPeakDistance) that you can use individually or in combination. Since there's no objective "right" answer here, you just need to play around until you're getting the behavior you're after.

### Categories

Find more on Descriptive Statistics in Help Center and File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by