x = load(mpin);

hold off;
plot(x(:,1),x(:,2),'r');
axis([0 1 0 1], "autox");
grid on;
print(mpout)


x = load(stagesin);

N = length(x(:,1));
for i = 1:N
  xx(i) = (x(i,1) + x(i,2)) / 2;
endfor

hold off;
plotyy(xx,x(:,3),xx,x(:,4));
grid on;
print(stagesout)

