%  Example 2.10.  Computes the MIMO state feedback gain.
clear
%  Define the state model matrices.
A=[ 0  1  0
    0 -2  1
   -3  0 -1];
B=[0 0
   1 0
   0 1];
%  Define the desired pole locations.
p=[-2+3*j -2-3*j -4];
%  Find the state feedback gain matrix.
K=place(A,B,p);
%  Checks the algebraic equations in the example (for this gain).
3+K(1,2)+K(2,3)
K(1,2)*K(2,3)+2*K(2,3)+K(1,2)+K(1,1)+2
K(1,1)+K(1,1)*K(2,3)+K(2,2)-K(2,2)*K(1,3)-3*K(1,3)-K(2,1)*K(1,3)+K(2,1)+3
