%PLOT CONVERGENCE TEST FOR ERROR CHECKS dts = [0.1 .05 .025 .015 .01 .0075 .005 .003 .001]; for i=1:numel(dts); dts(i) [X,Y,K,L,nmax,E1,E2,PE1,PE2,epsilon,l0] = subroutine(T, dts(i), -20, -8, 2, 1, G, varc, 1.4); PE1c(i) = PE1; PE2c(i) = PE2; end figure(2) plot(dts, PE1c, 'k+'); title('Figure 2: Convergence test for first error check') xlabel('timestep') ylabel('Percent Error') text(.01,1.2,'Accuracy of Path in Figure 1 released from \ity \rm = -8') text(.01,1.1,'as determined by invariance of \itM = ky-lx') figure(3); plot(dts, PE2c, 'k+'); title('Figure 3: Convergence test for second error check') xlabel('timestep') ylabel('Percent Error') text(.01,1.2,'Accuracy of Path in Figure 1 released from \ity \rm = -8') text(.01,1.1,'as determined by invariance of \Omega = \itc \kappa + \rm\bfu \cdot k')