Analog and Digital Filters 621
title(‘Phase of H(w) vs. w’)
figure(2);bode(num,den);
title(‘Bode plots:magnitude and phase’)figure(3);zplane(num,den);grid on;
title(‘zero-pole plot’)
disp(‘*********************************’);
disp(‘***** Numerical evaluations *****’);
disp(‘*********************************’);
disp(‘The system zero is at :’);roots(num)
disp(‘The system pole is at : ‘);roots(den)
disp(‘*********************************’);Back in the command window, the script fi le active_fi lter is executed and the results are
shown as follows (Figures 6.48 through 6.50):>> active _ filter
*********************************
****** Numerical evaluations *******
*********************************
The system zero is at :
ans =
-20
The system pole is at :
ans =
-3.3333e+003
*********************************FIGURE 6.48
Magnitude and phase plots of H(w) of Example 6.5.40
30500
1,000 2,000 3,000 4,000 5,000Magnitude of H (w) versus w6,000 7,000 8,000 9,000 10,0001,000 2,000 3,000 4,000 5,000 6,000 7,000 8,000 9,000 10,000w in rad /secMagnitude20
10604020800Angle in degrees w in rad /secPhase of H (w) versus w