Presentation is loading. Please wait.

Presentation is loading. Please wait.

MATLAB Session 6 ES 156 Signals and Systems 2007 HSEAS Prepared by Jiajun Gu.

Similar presentations


Presentation on theme: "MATLAB Session 6 ES 156 Signals and Systems 2007 HSEAS Prepared by Jiajun Gu."— Presentation transcript:

1 MATLAB Session 6 ES 156 Signals and Systems 2007 HSEAS Prepared by Jiajun Gu

2 Filters FIR vs. IIR If only a’s are zero except a(1) – FIR, otherwise, IIR Matlab: z=filter(b,a,x)

3 Example Input x is the rectangular signal The difference equation is x=(-10:10); x=cos(x.^2*0.01*pi)+sin(0. 3.*x*pi); a=1; b=[1,0.8]; z=filter(b,a,x) figure; subplot(2,1,1); stem(x); subplot(2,1,2) stem(z);

4 Bode plot Example: omega=logspace(-3,1,500); h=1./(1+j*10*omega); figure; subplot(2,1,1) semilogx(omega, 20*log10(abs(h))) grid on; subplot(2,1,2); semilogx(omega, angle(h)); grid on; Frequency response plots

5 Bode Plot Close look at  =1/10, -3db

6 Bode Plot – 2 nd order system omega=logspace(-4,2,1000); h=1./(10*(1+j*10*omega).*(1+j*100*o mega)); figure; subplot(2,1,1) semilogx(omega, 20*log10(abs(h))) grid on; subplot(2,1,2); semilogx(omega, angle(h)); grid on;

7 Bode Plot-2 nd order system


Download ppt "MATLAB Session 6 ES 156 Signals and Systems 2007 HSEAS Prepared by Jiajun Gu."

Similar presentations


Ads by Google