% % Newtons Problem of a Minimum-Drag Nose Shape in % Hypersonic Flow % load newton1.dat load newton2.dat load newton3.dat % t1 = newton1(:,1); y1 = newton1(:,2); r1 = newton1(1,4); L1 = 1; x1 = r1 + t1*(1-r1); plot(y1,x1) axis([-0.2 2.2 -1.2 1.2]) axis('square') hold % plot([-0.2 2.2],[0 0],'r--') plot([0 0],[-1 1]) plot([L1,L1],[-r1 r1]) plot(y1,-x1) % t2 = newton2(:,1); y2 = newton2(:,2); r2 = newton2(1,4); L2 = 1.5; x2 = r2 + t2*(1-r2); plot(y2,x2) plot([L2,L2],[-r2 r2]) plot(y2,-x2) % t3 = newton3(:,1); y3 = newton3(:,2); r3 = newton3(1,4); L3 = 2; x3 = r3 + t3*(1-r3); plot(y3,x3) plot([L3,L3],[-r3 r3]) plot(y3,-x3) % xlabel('Minimum-Drag Bodies of Revolution','FontSize',14) text(-0.15,0.8,'x','FontSize',14) text(1.9,-1.05,'y','FontSize',14) % %print -depsc newton %