clear
optlq22m
sim('optlq22s');


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

plot(t,u,'k-')
title('(b)')
xlabel('t')
ylabel('u')
set(1, 'PaperUnits', 'centimeters')
set(1, 'PaperPosition', [3 10 11 8.25])
print -deps 'optlq22gb.eps'

