%  cosresp.m
%  Pure cosine response
%   kja 071111
A=[0 1;-1 -0.1];B=[0;1];C=[1 0];D=0;
w=0.5;
t=0:0.01:100;
u=cos(w*t);
sys=ss(A,B,C,D);
x0=A*[w^2*eye(2)+A^2]\B;
y=lsim(sys,u,t,x0);
plot(t,y)