%Figure 5.6
%
%  m-file to generat plot of ideal sensitivity function
%  foe plant containing only a delay.
%  Original by: Kjetil Havre, 2/12-1995.
%

% Plot L when the ideal T is a delay
clear all
close all
w1 = logspace(-2, 0, 101);
w2 = logspace(0, 1, 1001);
w3 = logspace(1, 2, 10001);
omegax=[w1 w2 w3];
theta=1;

%t_g = delay(theta,omegax);
t_g = vpck(exp(-theta*j*omegax'),omegax');
S_g = msub(1,t_g);

l1 = [3e-2 1/theta; 1 1/theta; 2 Inf];

vplot('liv,lm',S_g,1,':', l1, ':')
axis([.01,100,.01,10]);
xlabel('Frequency*Delay');
ylabel('Magnitude');
text(1/theta,1.5e-2,'w=1/theta',     'VerticalAlignment', 'bottom',...
                           'HorizontalAlignment', 'center');
