% Example 6.5
%
Omega = -pi:2*pi/300:pi;
X = 1./(1+0.5*exp(-j*Omega));
subplot(211),plot(Omega,abs(X));
%  Note, the pi's in the x-axis in the book were added manually.
ylabel('|X|');
xlabelg('W')
subplot(212),plot(Omega,180*angle(X)/pi);
ylabel('Angle(X), degrees')
xlabelg('W')
subplot(111)
