Download presentation

Presentation is loading. Please wait.

Published byDonte Cosens Modified about 1 year ago

1
>> n=-50:50; wc=0.4*pi; >> hn=sinc(n*wc/pi)*wc/pi; >> stem(n,hn); title('Ideal LPF with cutoff frequency = 0.4 \pi')

2
>> w=linspace(0,pi,512); mag_hw=cos(w/2); >> [h,w1]=freqz([ ],[1]); >> subplot(2,1,1); plot(w/pi,mag_hw);title('|H(\omega)|of first order FIR LPF:analytical solution') >> subplot(2,1,2); plot(w1/pi,abs(h));title('|H(\omega)|of first order FIR LPF:FREQZ')

3
>> w=linspace(0,pi,512); mag_hw=sin(w/2); >> [h,w1]=freqz([ ],[1]); >> subplot(2,1,1); plot(w/pi,mag_hw);title('|H(\omega)|of first order FIR HPF:analytical solution') >> subplot(2,1,2); plot(w1/pi,abs(h));title('|H(\omega)|of first order FIR HPF:FREQZ')

4
>> w=linspace(0,pi,512); mag_hw=abs(sinc(w*(M+1)/2/pi)./sinc(w/2/pi)); >> b=ones(1,M+1)/(M+1);a=[1]; >> [h,w1]=freqz(b,a); >> subplot(2,1,1); plot(w/pi,mag_hw);title('|H(\omega)|of moving average filter (M=10):analytical solution') >> subplot(2,1,2); plot(w1/pi,abs(h));title('|H(\omega)|of moving average filter (M=10):FREQZ')

5

6

7

8
>> b=[5,2];a=[1, -0.8]; >> freqz(b,a)

9
>> b=[5 -0.4];a=[1 0.4]; >> zplane(b,a) >> freqz(b,a)

10
>> b=[0.15,0,-0.15]; a=[1,0,0.7]; >> zplane(b,a) >> freqz(b,a)

11
>> b=poly([0.9*exp(j*pi/2) 0.9*exp(-j*pi/2)]) b = >> a=poly([ ]) a = >> zplane(b,a) >> freqz(b,a)

12
>> R=0.9;w0=pi/3; >> a1=-2*R*cos(w0);a2=R^2; >> G=(1-R)*sqrt(1-2*R*cos(2*w0)+R^2); >> b=[G]; a=[1 a1 a2]; >>zplane(b,a) >> freqz(b,a)

13
>> R=0.8;r=0.7;w0=pi/3; >> a1=-2*R*cos(w0);a2=R^2; >> b1=-2*r*cos(w0);b2=r^2; >> b=[1 b1 b2];a=[1 a1 a2]; >> zplane(b,a) >> freqz(b,a)

14
>> R=0.8;r=0.785;w0=pi/3; >> a1=-2*R*cos(w0);a2=R^2; >> b1=-2*r*cos(w0);b2=r^2; >> b=[1 b1 b2];a=[1 a1 a2]; >> zplane(b,a) >> freqz(b,a)

15
>> R=0.8;r=0.815;w0=pi/3; >> a1=-2*R*cos(w0);a2=R^2; >> b1=-2*r*cos(w0);b2=r^2; >> b=[1 b1 b2];a=[1 a1 a2]; >> zplane(b,a) >> freqz(b,a)

16
>> R=0.98;r=1;w0=pi/3; >> a1=-2*R*cos(w0);a2=R^2; >> b1=-2*r*cos(w0);b2=r^2; >> b=[1 b1 b2];a=[1 a1 a2]; >> zplane(b,a) >> freqz(b,a)

17
“Clean” ECG signal

18
“Noisy” ECG signal

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google