%% Phase plane state trajectory of mass-spring-damper system
% Define state-space system
A=[0 1; -1 -0.5];
B=[0; 0.1];
C=eye(2);
D=zeros(2,1);
x0=[0.05; 0];
% time vector
T=0:.1:100;
% input signal (zero)
U=zeros(length(T),1);

%simulate 
SYS=ss(A,B,C,D);
[YS,TS,XS] = LSIM(SYS,U,T,x0);
plot(100*XS(:,1),100*XS(:,2))
