Analog and Digital Filters 635
ylabel(‘Input:DC component’);
subplot(3,1,2)
plot(n*T,f1);
ylabel(‘Input:2cos(0.2 t)’);
subplot(3,1,3)
plot(n*T,f2);
ylabel(‘Input:cos(0.5t)’);
xlabel(‘time’)
figure(2)
input = 2.*ones(1,301) + 2*cos(.2*T.*n) + cos(.5*T.*n);
output1 = filter(Pz1,Qz1,input);
output2 = filter(Pz2,Qz2,input);
subplot(3,1,1)
plot(n*T,input), hold on; stem(n*T,input)
ylabel(‘Input sequence’)
subplot(3,1,2);
plot(n*T,output1); hold on; stem(n*T,output1);
ylabel(‘Outputs Chev 1’)
subplot(3,1,3);
plot(n*T,output2);hold on;stem(n*T,output2)
ylabel(‘Outputs Chev 2’)
xlabel(‘nT’);
The script fi le Cheby_1_2 is executed and the results are shown in Figures 6.61
and 6.62.
FIGURE 6.61
Component plots of the input of x(t) of Example 6.11.
2
1
Input: DC component
3
0102030 4050 60 70 80 90
Input: cos (0.5t) 1
01020304050
time
60 70 80 90
0
1
Input: 2cos (0.2t)
2
2
0102030405060708090
0