PRACTICAL MATLAB® FOR ENGINEERS PRACTICAL MATLAB

(sharon) #1

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
30

50

0
1,000 2,000 3,000 4,000 5,000

Magnitude of H (w) versus w

6,000 7,000 8,000 9,000 10,000

1,000 2,000 3,000 4,000 5,000 6,000 7,000 8,000 9,000 10,000

w in rad /sec

Magnitude

20
10

60

40

20

80

0

Angle in degrees w in rad /sec

Phase of H (w) versus w
Free download pdf