Reply by vani chezhiyan February 20, 20042004-02-20
hi all,
i'm doing preprocessing of ecg signals.
i have an ecg signal with sampling frequency 1000hz.
i have lowpass filtered & then highpass filtered the signal.now that i want to
use a notch filter or comb filter to remove the powerline interference at 60hz(
,180,300,420,540,660 hz);
i used the following code for notch filtering(at 60hz)
fs00;f1`;
w0=2*pi*f1/fs;
r=cos(w0);
i=sin(w0);
r1=0.99*r;
i1=0.99*i;
b=conv([1 -r-i*i],[1 -r+i*i]);
a=conv([1 -r1-i*i1],[1 -r+i*i1]);
h=filter(b,a,ecg);

is my code right?i am not getting the plot correctly also.
can anyone please help me with the code for my problem?
thanx in advance.