Info

This question is closed. Reopen it to edit or answer.

sir i have been doing a project on effect of playing video games on heart.I have obtained the ecg signal & have done the filtering.now i need a code to find out the number of R-R peaks.Can you help me?

1 view (last 30 days)
wo = 50/(250/2); bw = wo/35;
[b,a] = iirnotch(wo,bw);fvtool(b,a);
y=filter(b,a,x1);
z=sgolayfilt(y,0,7);
subplot(2,1,1)
plot([1:1000],x1(1:1000));axis([0 1000 -.5 2]);title('ecg');grid;
subplot(2,1,2)
plot([1:1000],z(1:1000));axis([0 1000 -.5 2]);title('filtered');grid;
yy = smooth(z,1,'moving');
k = smooth(z,239,'moving');
ans=yy-k;
plot([1:1000],ans(1:1000));axis([0 1000 -.5 2]);title('baseline removed');grid;
  1 Comment
Jan
Jan on 25 Dec 2011
This question is not readable. 1. Choose a short meaningful title. 2. Describe the problem and ask a question, which is as explicite as possible. 3. Add some one-word tags. 4. Format your code as explained in the "Markup help" link on this page.
Currently the question looks, like you do not care about the readers.

Answers (1)

Image Analyst
Image Analyst on 25 Dec 2011
What about findpeaks() in the Signal Processing Toolbox? Or try this: http://billauer.co.il/peakdet.html

Community Treasure Hunt

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

Start Hunting!