
parameters = struct('a',133.0,'n',8646894.0,'h',10.828899);
binalt = 100:(399/89):499;
col = jet(90);

for i = 1:90
    f(i,:) = makeChap(binalt,parameters,i);
    plot(f(i,:),binalt,'color',col(i,:));
    axis([10 9000000 100 500])
    saveas(gcf,['Z3ChapPlot',num2str(i,'%03d'),'.png']);
    pause(0.0000001);
end

for k = 1:90
    plot(f(i,:),binalt,'color',col(i,:));
    axis([10 9000000 100 500])
    hold on
    pause(0.0000001);
end
saveas(gcf,['Z2ChapAll.png'])