Find Peaks, how to ignore peaks that are not so sharp?

3 次查看(过去 30 天)
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

回答(2 个)

Star Strider
Star Strider 2017-3-15
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 个评论
Luciano Junior
Luciano Junior 2017-3-16
'MinPeakProminence' seems to be more apropriate, but it gives me an error: "??? Error using ==> uddpvparse at 119 Invalid Parameter/Value pairs.
Error in ==> findpeaks at 46 hopts = uddpvparse('dspopts.findpeaks',varargin{:});"
is it because im using an old Matlab version??
Thank you for the help
Adam
Adam 2017-3-16
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
Jan 2017-3-15
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.

Community Treasure Hunt

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

Start Hunting!

Translated by