624 Practical MATLAB® Applications for Engineers
phase3=angle(h3);
subplot(1,3,3);
plot(w,phase3);axis([0 3 -2 2]);
xlabel(‘freq w(rad/sec)’);
ylabel(‘phase in rad’);
title(‘Chebyshev 2, phase plot’)
Back in the command window, the script fi le butt_chev is executed and the magnitude
and phase plots are shown in Figures 6.51 and 6.52.FIGURE 6.51
Magnitude plots of the analog LP Butterworth, Chebyshev/type-1, and Chebyshev/type-2 fi lters of Example 6.6.
20Butterworth LPF, N 510 10
20
30
40
50
60
70
80
05
frequency w (rad/s)0gain, db05
frequency w (rad/s)20Chebyshev 1 LPF, N 5 20 40 60 80 1000gain, db01 2
frequency w (rad/s)Chebyshev 2 LPF, N 5
10 10 20 30 40 500gain, dbFIGURE 6.52
Phase plots of the analog LP Butterworth, Chebyshev/type-1, and Chebyshev/type-2 fi lters of Example 6.6.
Butterworth, phase plot
4321phase in rad0 1 2 3 4
0231
freq w (rad/s)Chebyshev 1, phase plot
4321phase in rad0 1 2 3 4
012
freq w (rad/s)Chebyshev 2, phase plot
21.510.50 1 2phase in rad0312
freq w (rad/s)0.51.5