%
% Set up inputs for the students.
%
g        = .1;
tauk     = .2;
taul     = .1;
tauc     = .05;
taux     = .0;
z        = 2.15;


%
% Case 0.
%
%  Steady state
%
Z        = z*ones(1,22);
G        = g*ones(1,22);
Taul     = taul*ones(1,22);
Tauk     = tauk*ones(1,22);
Taux     = taux*ones(1,22);
Tauc     = tauc*ones(1,22);
Pi       = eye(22);

disp(sprintf([' %6.4f %6.4f %6.4f %6.4f %6.4f %6.4f %6.4f %6.4f ', ...
               '%6.4f %6.4f %6.4f %6.4f %6.4f %6.4f %6.4f %6.4f ', ...
               '%6.4f %6.4f %6.4f %6.4f %6.4f %6.4f \n'], ...
               [G;Tauk;Taul;Tauc;Taux;Z;Pi]'))
disp(' ')

%
%
%


[x,P,pi] = tauchen(.9,.05,11);
lam1     = .01;
lam2     = .01;
lam3     = .1;

Pi       = [P'-lam1*eye(11),zeros(11)+[zeros(5,11);
                                      lam2*ones(1,10),lam3;
                                      zeros(5,11)];
            lam1*eye(11),[zeros(1,11);
                          (1-lam2)*eye(10),[zeros(9,1);1-lam3]]];


%
% Case 1.
%
%  Botsmania
%     Description: Normal fluctuations due to z
%                  Large one time change in taul and taux
%

Z        = [z+x,z*ones(1,11)];
Taul     = [taul*ones(1,11),linspace(.1,.2,6),linspace(.2,.14,5)];
Taux     = [taux*ones(1,11),linspace(0,.1,6),linspace(.1,0.02,5)];
G        = g*ones(1,22);
Tauk     = tauk*ones(1,22);
Tauc     = tauc*ones(1,22);

disp(sprintf([' %6.4f %6.4f %6.4f %6.4f %6.4f %6.4f %6.4f %6.4f ', ...
               '%6.4f %6.4f %6.4f %6.4f %6.4f %6.4f %6.4f %6.4f ', ...
               '%6.4f %6.4f %6.4f %6.4f %6.4f %6.4f \n'], ...
               [G;Tauk;Taul;Tauc;Taux;Z;Pi]'))
disp(' ')

%
% Case 2.
%
%  Brunesia
%     Description: Normal fluctuations due to g and taul
%                  Large one time change in tauc 
%

[x,P,pi] = tauchen(.9,.01,11);
G        = [g+x,g*ones(1,11)];
Taul     = [taul+x,taul*ones(1,11)];
Tauc     = [tauc*ones(1,11),linspace(.05,.15,6),linspace(.14,.05,5)];
Z        = z*ones(1,22);
Tauk     = tauk*ones(1,22);
Taux     = taux*ones(1,22);

disp(sprintf([' %6.4f %6.4f %6.4f %6.4f %6.4f %6.4f %6.4f %6.4f ', ...
               '%6.4f %6.4f %6.4f %6.4f %6.4f %6.4f %6.4f %6.4f ', ...
               '%6.4f %6.4f %6.4f %6.4f %6.4f %6.4f \n'], ...
               [G;Tauk;Taul;Tauc;Taux;Z;Pi]'))
disp(' ')

%
% Case 3.
%
%  Caitland
%     Description: Normal fluctuations due to z
%                  Large one time change in taul and g
%

x        = tauchen(.9,.05,11);
Z        = [z+x,z*ones(1,11)];
Taul     = [taul*ones(1,11),linspace(.1,.20,6),linspace(.19,.1,5)];
G        = [g*ones(1,11),linspace(.1,.20,6),linspace(.19,.1,5)];
Tauc     = tauc*ones(1,22);
Tauk     = tauk*ones(1,22);
Taux     = taux*ones(1,22);

disp(sprintf([' %6.4f %6.4f %6.4f %6.4f %6.4f %6.4f %6.4f %6.4f ', ...
               '%6.4f %6.4f %6.4f %6.4f %6.4f %6.4f %6.4f %6.4f ', ...
               '%6.4f %6.4f %6.4f %6.4f %6.4f %6.4f \n'], ...
               [G;Tauk;Taul;Tauc;Taux;Z;Pi]'))
disp(' ')

%
% Case 4.
%
%  Candu
%     Description: Normal fluctuations due to g and tauc
%                  Large one time change in z
%

x        = tauchen(.9,.01,11);
y        = tauchen(.9,.005,11);
G        = [g+x,g*ones(1,11)];
Tauc     = [tauc+y,tauc*ones(1,11)];
Z        = [z*ones(1,11),linspace(2.1,1.8,6),linspace(1.8,1.9,5)];
Tauk     = tauk*ones(1,22);
Taul     = taul*ones(1,22);
Taux     = taux*ones(1,22);

disp(sprintf([' %6.4f %6.4f %6.4f %6.4f %6.4f %6.4f %6.4f %6.4f ', ...
               '%6.4f %6.4f %6.4f %6.4f %6.4f %6.4f %6.4f %6.4f ', ...
               '%6.4f %6.4f %6.4f %6.4f %6.4f %6.4f \n'], ...
               [G;Tauk;Taul;Tauc;Taux;Z;Pi]'))
disp(' ')

%
% Case 5.
%
%  Ebony Coast
%     Description: Normal fluctuations due to z
%                  Large one time change in tauk and g
%

x        = tauchen(.9,.05,11);
Z        = [z+x,z*ones(1,11)];
Tauk     = [tauk*ones(1,11),linspace(.2,.30,6),linspace(.29,.2,5)];
G        = [g*ones(1,11),linspace(.1,.20,6),linspace(.19,.1,5)];
Tauc     = tauc*ones(1,22);
Taul     = taul*ones(1,22);
Taux     = taux*ones(1,22);

disp(sprintf([' %6.4f %6.4f %6.4f %6.4f %6.4f %6.4f %6.4f %6.4f ', ...
               '%6.4f %6.4f %6.4f %6.4f %6.4f %6.4f %6.4f %6.4f ', ...
               '%6.4f %6.4f %6.4f %6.4f %6.4f %6.4f \n'], ...
               [G;Tauk;Taul;Tauc;Taux;Z;Pi]'))
disp(' ')


  
