PRACTICAL MATLAB® FOR ENGINEERS PRACTICAL MATLAB

(sharon) #1

648 Practical MATLAB® Applications for Engineers


title(‘Order=8’)
ylabel(‘Magnitude(H)’);
xlabel(‘W in rad’)
subplot(2,2,4)
plot(f,mag,’o’,omega,abs(h10))
title(‘Order=10’)
ylabel(‘Magnitude(H)’);
xlabel(‘W in rad’)
figure(2)
subplot(2,2,1)
plot(omega,angle(h4)),
title(‘Order=4’);ylabel(‘A ngle’)
subplot(2,2,2)
plot(omega,angle(h6));
title(‘Order=6’);ylabel(‘A ngle’)
subplot(2,2,3)
plot(omega,angle(h8))
title(‘Order=8’);
xlabel(‘W in rad’);ylabel(‘Angle’)
subplot(2,2,4)
plot(omega,angle(h10));
title(‘Order=10’)
xlabel(‘W in rad’);ylabel(‘Angle’)
Back in the command window, the script fi le IIR-yul is executed and the results are
shown as follows (Figures 6.73 and 6.74):
>> IIR-yul

FIGURE 6.73
Magnitude plots of IIR normalized LP digital fi lter of order: 4, 6, 8, and 10 using the function yulewalk of
Example 6.18.


0

1.5

0.5
Magnitude (H)

1

0
0.5 1

Order 4

0

1.5

0.5
Magnitude (H)

1

0
0.5 1

Order 6

0

1.5

0.5
Magnitude (H)

1

0
0.5 1

Order 8

W in rad W in rad

0

1.5

0.5
Magnitude (H)

1

0
0.5 1

Order 10
Free download pdf