%
%  state variable driver the the direct
%  state variable feedback system
%
%  set the final time
%
  T = 15;
%
  A = [0 0 1; 0 1 0; 6 -1 1];
  B = [0; 1; 1];
%
%  assume y = x1, but we want to look at all of the
%    states in the simulation
%
  Cy = [1 0 0];
  C = eye(3,3);
%
% place the poles
%
  p = [-3+3*j -3-3*j -10];
  K = place(A,B,p);
%
%  determine the initial gain matrix
%
  F = -1/(Cy*inv(A-B*K)*B);
%
%  simulate the system
%
  sim('state_variable_a',[0 T]);
%
%  plot the results
%
  subplot(3,1,1); plot(t,u,':',t,y(:,1),'-'); grid; ylabel('x_1'); legend('Input','Output',4);
  subplot(3,1,2); plot(t,y(:,2)); grid; ylabel('x_2');
  subplot(3,1,3); plot(t,y(:,3)); grid; ylabel('x_3');
return;