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.
20
Butterworth LPF, N 5
10
10
20
30
40
50
60
70
80
05
frequency w (rad/s)
0
gain, db
05
frequency w (rad/s)
20
Chebyshev 1 LPF, N 5
20
40
60
80
100
0
gain, db
01 2
frequency w (rad/s)
Chebyshev 2 LPF, N 5
10
10
20
30
40
50
0
gain, db
FIGURE 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
4
3
2
1
phase in rad
0
1
2
3
4
0231
freq w (rad/s)
Chebyshev 1, phase plot
4
3
2
1
phase in rad
0
1
2
3
4
012
freq w (rad/s)
Chebyshev 2, phase plot
2
1.5
1
0.5
0
1
2
phase in rad
0312
freq w (rad/s)
0.5
1.5