Yfilterb1x n01399 x12sin2pi1000n8000

This preview shows page 69 - 75 out of 171 pages.

>> x=1.2*sin(2*pi*1000*[0:1:399]/8000)-1.5*cos(2*pi*2800*[0:1:399]/8000); >> y=filter(B,1,x); >> n=0:1:399; >> x=1.2*sin(2*pi*1000*n/8000)-1.5*cos(2*pi*2800*n/8000); >> y=filter(B,1,x); >> subplot(2,1,1),plot(n,x);xlabel('n');ylabel('Input');grid >> subplot(2,1,2),plot(n,y);xlabel('n');ylabel('Output');grid 0 50 100 150 200 250 300 350 400 -4 -2 0 2 4 n Input 0 50 100 150 200 250 300 350 400 -2 -1 0 1 2 n Output
Image of page 69
Instructor’s Guide to Accompany to Digital Signal Processing , Fundamentals and Applications, Second Edition 70 7.34 1 20 10 1 0.1220 p , 40 20 10 0.01 s , 12 s W and 1 p W ------------------------------------------------------------------ >> fs=8000; >> f=[0 0.3 0.375 1]; >> m=[1 1 0 0]; >> W=[1 12]; >> b=remez(53,f,m,W); >> freqz(b,1,512,fs) ---------------------------------------------------------------------------------- B =[ 0.0020 -0.0003 -0.0043 -0.0086 -0.0089 -0.0032 0.0049 0.0083 0.0029 -0.0073 -0.0121 -0.0048 0.0098 0.0173 0.0075 -0.0134 -0.0252 -0.0120 0.0190 0.0387 0.0204 -0.0300 -0.0684 -0.0420 0.0656 0.2114 0.3156 0.3156 0.2114 0.0656 -0.0420 -0.0684 -0.0300 0.0204 0.0387 0.0190 -0.0120 -0.0252 -0.0134 0.0075 0.0173 0.0098 -0.0048 -0.0121 -0.0073 0.0029 0.0083 0.0049 -0.0032 -0.0089 -0.0086 -0.0043 -0.0003 0.0020] 0 500 1000 1500 2000 2500 3000 3500 4000 -2000 -1500 -1000 -500 0 Frequency (Hertz) Phase (degrees) 0 500 1000 1500 2000 2500 3000 3500 4000 -100 -50 0 50 Frequency (Hertz) Magnitude Response (dB) 7.35 1 20 10 1 0.1220 p , 40 20 10 0.01 s , 12 s W and 1 p W ------------------------------------------------------- >> fs=8000; >> f=[0 0.2 0.3 0.4 0.5 1]; >> m=[0 0 1 1 0 0]; >> W=[12 1 12]; >> b=remez(53,f,m,W); >> freqz1(b,1,512,fs) -------------------------------------------------------------------- B =[ -0.0004 -0.0013 -0.0000 0.0003 -0.0006 -0.0002 0.0041 0.0068 -0.0010 -0.0140 -0.0140 0.0049 0.0207 0.0126 -0.0057 -0.0066 0.0027 -0.0108
Image of page 70
Instructor’s Guide to Accompany to Digital Signal Processing , Fundamentals and Applications, Second Edition 71 -0.0393 -0.0232 0.0545 0.1041 0.0301 -0.1138 -0.1533 -0.0139 0.1565 0.1565 -0.0139 -0.1533 -0.1138 0.0301 0.1041 0.0545 -0.0232 -0.0393 -0.0108 0.0027 -0.0066 -0.0057 0.0126 0.0207 0.0049 -0.0140 -0.0140 -0.0010 0.0068 0.0041 -0.0002 -0.0006 0.0003 -0.0000 -0.0013 -0.0004 0 500 1000 1500 2000 2500 3000 3500 4000 -1000 -500 0 500 Frequency (Hertz) Phase (degrees) 0 500 1000 1500 2000 2500 3000 3500 4000 -150 -100 -50 0 50 Frequency (Hertz) Magnitude Response (dB)
Image of page 71
Instructor’s Guide to Accompany to Digital Signal Processing , Fundamentals and Applications, Second Edition 72 Chapter 8 8.1 1 1 0.3333 0.3333 ( ) 1 0.3333 z H z z ( ) 0.3333 ( ) 0.3333 ( 1) 0.3333 ( 1) y n x n x n y n 8.2 a. 1 1 0.3375 0.3375 ( ) 1 0.3249 z H z z ( ) 0.3375 ( ) 0.3375 ( 1) 0.3249 ( 1) y n x n x n y n b. freqz([0.3375 0.3375],[1 -0.3249],512,200) 0 10 20 30 40 50 60 70 80 90 100 -100 -50 0 Frequency (Hertz) Phase (degrees) 0 10 20 30 40 50 60 70 80 90 100 -60 -40 -20 0 Frequency (Hertz) Magnitude Response (dB) 8.3 a. 1 1 0.6625 0.6625 ( ) 1 0.3249 z H z z ( ) 0.6225 ( ) 0.6225 ( 1) 0.3249 ( 1) y n x n x n y n b. >> freqz([0.6225 -0.6225],[1 -0.3594],512,200)
Image of page 72
Instructor’s Guide to Accompany to Digital Signal Processing , Fundamentals and Applications, Second Edition 73 0 10 20 30 40 50 60 70 80 90 100 0 50 100 Frequency (Hertz) Phase (degrees) 0 10 20 30 40 50 60 70 80 90 100 -60 -40 -20 0 Frequency (Hertz) Magnitude Response (dB) 8.4 a. 2 2 0.6340 0.6340 ( ) 1 0.2679 z H z z b = ( ) 0.6340 ( ) 0.6340 ( 2) 0.2679 ( 2) y n x n x n y n b. >> freqz([0.6340 0 0.6340],[1 0 0.2679],512,120) 0 10 20 30 40 50 60 -100 -50 0 50 100 Frequency (Hertz) Phase (degrees) 0 10 20 30 40 50 60 -40 -20 0 20 Frequency (Hertz) Magnitude Response (dB)
Image of page 73
Instructor’s Guide to Accompany to Digital Signal Processing , Fundamentals and Applications, Second Edition 74 8.5 a. 2 1 2 0.2113 0.2113 ( ) 1 0.8165 0.5774 z H z z z ( ) 0.2113 ( ) 0.2113 ( 2) 08165 ( 1) 0.5774 ( 2) y n x n x n y n y n b. >> freqz([0.2113 0 -0.2113],[1 -0.8165 0.5774],512,120) 0 10 20 30 40 50 60 -100 -50 0 50 100 Frequency (Hertz) Phase (degrees) 0 10 20 30 40 50 60 -60 -40 -20 0 Frequency (Hertz) Magnitude Response (dB) 8.6 a. 1 1 0.4005 0.4005 ( ) 1 0.1989 z H z z ( ) 0.4005 ( ) 0.4005 ( 1) 0.1989 ( 1) y n x n x n y n b.
Image of page 74
Image of page 75

You've reached the end of your free preview.

Want to read all 171 pages?

  • Spring '18
  • Dr. Wanod Kumar

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture