Finding ECG Local Maximums using Threshold/Loops

Hi, I am trying to figure out how to use a threshold to isolate data from an ECG signal and then find the maximums for each spike that has data above the threshold. I feel that I have to use a loop to analyze the data. I know that if I start with: threshold = 8.5 y > threshold I get values of 0 or 1 that tell me if the threshold has been passed, but then I get lost. Any help would be appreciated :)

Answers (2)

If you have the Signal Processing Toolbox, use findpeaks(). If you have the Image Processing Toolbox, use imregionalmax(). If you don't have either of those, check the File Exchange or here: http://billauer.co.il/peakdet.html

2 Comments

Bob said in his "Answer" below: "Thanks! but findpeaks gives me many peaks instead of just the ones above the threshold. Any help on how to do that?"
Bob, look at the help. See the option for 'MINPEAKHEIGHT'? I think that if you adjust that you can get what you want. Perhaps you might also need to specify 'MINPEAKDISTANCE' and 'THRESHOLD' also.

Sign in to comment.

Thanks! but findpeaks gives me many peaks instead of just the ones above the threshold. Any help on how to do that?

Asked:

Bob
on 1 Apr 2013

Community Treasure Hunt

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

Start Hunting!