clear
ad031init
sim('ad031s');

t = data.time;
u = data.signals.values(:,1);
yy = data.signals.values(:,2);
w = data.signals.values(:,3);
[tt,uu]=stairs(t,u);
[tt,ww]=stairs(t,w);
plot(tt,uu,'k--', t,yy, 'k-',tt,ww,'k:')
title('(a)')
legend('u','y','w')
xlabel('t')
ylabel('u,y,w')
set(1, 'PaperUnits', 'centimeters')
set(1, 'PaperPosition', [3 10 11 8.25])
print -deps 'oad032a.eps'

t = param.time;
b1 = param.signals.values(:,1);
b2 = param.signals.values(:,2);
a1 = param.signals.values(:,4);
a2 = param.signals.values(:,5);
[tt,bb1]=stairs(t,b1);
[tt,bb2]=stairs(t,b2);
[tt,aa1]=stairs(t,a1);
[tt,aa2]=stairs(t,a2);
plot(tt,bb1,'k-',tt,bb2,'k-.',tt,aa1,'k--',tt,aa2,'k:')
title('(b)')
legend('b1','b2','a1','a2')
xlabel('t')
ylabel('Param')
set(1, 'PaperUnits', 'centimeters')
set(1, 'PaperPosition', [3 10 11 8.25])
print -deps 'oad032b.eps'

