How does "findpeak" work? How does it ignore the unwanted peaks?

7 次查看(过去 30 天)
Hi everyone,
I am working on a flowchart to show how the "findpeak" works in MATLAB. I want to know that how the function ignores the peaks that don't meet the conditions?
Suppose that there are two conditions for detecting a R peak in an ECG (min pick distace and min peak height). At the first step I want to examine min peak distance; which peaks will be ignored between two peaks? the smallest one? and which peaks will be selected as the right R peak? the biggest one?
I appreciate every comments and suggestions in advance.

采纳的回答

dpb
dpb 2021-6-21
The doc for 'MinPeakDistance' explains that it picks the tallest in the signal overall and then ignores everything else within the distance value from that location -- doesn't matter what size they might be; maybe only one pixel less; no matter, still will be ignored as if it weren't present at all.
Then it moves to the next largest and does the same thing....you'll only have left whatever is the comb filter of those that are that minimum distance apart.
Then, if anything left isn't the minimum height, you'll not get it, either.
You may be more interested in prominence than absolute height, and unless the spacing is pretty uniform or the distance between the desired patterns is sizable with respect to the minimum distance, that may not be the best discriminator to use, either.
  3 个评论
dpb
dpb 2021-6-21
Beyond the documentation provided, I'm unaware of it if there is (not that there isn't somebody's blog or something somewhere, I just don't know).
If you're really, really interested, it is implemented as an m-file and you can read the code to see exactly how it works. I've looked at pieces to see about some specifics on occasion, but not recently enough to be able to expound in depth from recollection.

请先登录,再进行评论。

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by