function primer4a
    A= [1 3;-1 1]; B= [1;-1];
    U=[B A*B]
    p= A^2+3*A+2*eye(2);
    K= [0 1]*inv(U)*p
    
    ode45(@rp,[0 15],[0.5 -0.5])

    function uu= u(x)
        uu= -K*x;
    end
    function xt= rp(t,x)
       xt=[x(1)+exp(3*x(2))-1+cos(x(2))*u(x);...
            -x(1)*exp(x(2))+sin(x(2))-(1+x(1))*u(x)];   
    end


end