close all
s = zpk('s');
for k=[0.1 1 10]
G = 20/(s+0.001)/(s+1);
W1 = k/(s+0.001);
W2 = 1;
W3 = 1;
[K,CL,GAM] = mixsyn(G,W1,W2,W3);
L = G*K;
S = inv(1+L);
T = 1-S;
figure(1)
gang_of_four(G,K,G,logspace(-2,3,1000));
hline = findobj(gcf, 'type', 'line');
set(hline,'Linewidth',2)
grid on; hold on

figure(2)
sigma(S,'-',GAM/W1,'--',{1e-2,1e3})
axis([1e-2 1e3 1e-4 100])
grid on; hold on
hline = findobj(gcf, 'type', 'line');
set(hline,'Linewidth',2)
figure(3)
sigma(K*S,'-',GAM/ss(W2),'--',{1e-2,1e3})
hline = findobj(gcf, 'type', 'line');
set(hline,'Linewidth',2)
grid on; hold on
figure(4)
sigma(T,'-',GAM/ss(W3),'--',{1e-2,1e3})
hline = findobj(gcf, 'type', 'line');
set(hline,'Linewidth',2)
grid on; hold on
end

% figure(1)
% print -depsc fig/motorexgof.eps
% figure(2)
% print -depsc fig/motorexS.eps
% figure(3)
% print -depsc fig/motorexKS.eps
% figure(4)
% print -depsc fig/motorexT.eps



