Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Standard view
Full view
of .
0 of .
Results for:
P. 1
DSP Lab 3 Solution

# DSP Lab 3 Solution

Ratings:
(0)
|Views: 25|Likes:

### Availability:

See more
See less

10/13/2013

pdf

text

original

A.1)
b = [1 0.1];a = [1 0.2 9.01];fs = 1/0.1;fori = 1:2figure(i);[Ha, Wa] = freqs(b,a,512);plot(Wa/(2*pi), 20*log10(abs(Ha)),'.');holdon; xlabel('Frequency');ylabel('Magnitude');[bz, az] = impinvar(b,a,fs);[Hd, Wd] = freqz(bz,az,512,fs);plot(Wd,20*log10(abs(Hd)));legend('Analog filter','Digital filter'); fs=1/0.5end
A.2)
b = [1 0.1];a = [1 0.2 9.01];sys = tf(b,a);ts = 0.1;fori = 1:2figure(i);t = 0:ts:50*i;impulse(sys,t); holdon;fs = 1/ts;[bz, az] = impinvar(b,a,fs);dimpulse(bz,az);ts = 0.5;end

A.3)
b = [1 0.1];a = [1 0.2 9.01];fs = 1/0.1;fori = 1:2figure(i);[Ha, Wa] = freqs(b,a,512);plot(Wa/(2*pi), 20*log10(abs(Ha)),'.');holdon; xlabel('Frequency');ylabel('Magnitude');[bz, az] = bilinear(b,a,fs);[Hd, Wd] = freqz(bz,az,512,fs);plot(Wd,20*log10(abs(Hd)));legend('Analog filter','Digital filter'); fs=1/0.5endsys = tf(b,a);ts = 0.1;fori = 3:4figure(i);t = 0:ts:100;impulse(sys,t); holdon;fs = 1/ts;[bz, az] = bilinear(b,a,fs);dimpulse(bz,az);ts = 0.5;end