Z1=1; Z2=1;
T1=1;
r=0; w=1;
I = 0; D = 0;
PP=[1 3 10];
vys=cell(3,1);
for i=1:3;
  P = PP(i);
  sim('vympid');
  vys{i} = res;
end


t1=vys{1}(:,1); t2= vys{2}(:,1); t3= vys{3}(:,1);
w=vys{1}(:,2);
u1=vys{1}(:,3); u2= vys{2}(:,3); u3= vys{3}(:,3);
y1=vys{1}(:,4); y2= vys{2}(:,4); y3= vys{3}(:,4);
%subplot(2,1,1);
plot(t1,w,'k:',t1,y1,'k-',t2, y2,'k--',t3, y3,'k-.');
v=axis;
axis([v(1) v(2) v(3) 1.2]);
legend(' w', 'Z_R=1', 'Z_R=3', 'Z_R=10');
ylabel('y/A');

% $$$ subplot(2,1,2);
% $$$ plot(t1,u1,'k-',t2,u2,'k--',t3,u3,'k-.');
% $$$ legend('Z_R=1', 'Z_R=3', 'Z_R=10');
% $$$ ylabel('u');
xlabel('t/T_1');
set(1, 'PaperUnits', 'centimeters')
set(1, 'PaperPosition', [3 10 11 8.25])
print -deps 'obr6pvym.eps'
