%Second order system
t=0:0.1:16;
subplot(221);
y=exp(-0.25*t).*sin(t);
yu=exp(-0.25*t);
yl=-yu;
y0=zeros(size(t));
p1=plot(t,y,'b-',t,y0,t,yu,'b--',t,yl,'b--');
set(p1,'linewidth',2)
axis([0 16 -0.4 1.0])
xlabel('x');
ylabel('y');
title('complex stable')
%
y=exp(0.25*t).*sin(t);
yu=exp(0.25*t);
yl=-yu;
y1=1+t;
subplot(223)
p2=plot(t,y,'b-',t,y0,t,yu,'b--',t,yl,'b--');
set(p2,'linewidth',2)
axis([0 16 -20 40])
xlabel('x')
ylabel('y')
title('complex unstable');
print -depsc secondorder.eps

