Find Peaks, how to ignore peaks that are not so sharp?
3 views (last 30 days)
Show older comments
I need to find peaks in a first derivative curve. Peaks that are no so sharp doest not fit to the purpose of my work. I have tried "findpeaks", "peakseek" and "peakdet" with no success. Setting a trheshold also does not help, once the undesireble peaks can be above or bellow zero, or higher than other important peaks. In the example bellow the red circle shows in red, the peak I want to ignore, and the other circles in green are ok. Is there a way to select a peak based on how sharp it is?
Thank you
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/161751/image.jpeg)
0 Comments
Answers (2)
Star Strider
on 15 Mar 2017
You did not post the findpeaks code you used, so I am not certain what options you have used.
Use the findpeaks function with appropriate name-value pair arguments. The 'MinPeakProminence' and 'MinPeakHeight' options would be my first choice. Experiment to get the result you want.
3 Comments
Adam
on 16 Mar 2017
doc findpeaks
should tell you if it is an option in whichever version you have. I don't know which version it was added in, it is hard to tell without trawling through old docs or release notes.
Jan
on 15 Mar 2017
Determine the peaks and the gradient() at the peaks. Then exclude the peaks with the low gardient.
It might be useful not to use the gradient between the direct neighbors, because this might be dominated by noise. Perhaps a Savitzky-Golay filter for the surrounding 100 points helps.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!