%Response of first order stable system
t=0:0.1:4;
y=exp(-t);
y1=max(0,1-t);
subplot(221)
pl=plot(t,y,'b-',t,y1,'b--');
set(pl,'Linewidth',2.5);
axis([0 4 0 1.1])
title('real stable')
xlabel('t')
ylabel('x')
%Response of firs order unstable system
t=0:0.1:2;
y=exp(t);
y1=max(0,1+t);
subplot(223)
pl=plot(t,y,'b-',t,y1,'b--');
set(pl,'Linewidth',2.5);
axis([0 2 0 8])
title('real unstable')
xlabel('t')
ylabel('x')
print -depsc firstorder.eps
