ASE 366K - Kepler Equation Temp

ASE 366K - Kepler Equation Temp - .. num2str(M) ', e = '...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
% keplerEq.m % Numerical solutions to Kepler's equation. % clear; clc; %----- Parameters e = 0.7; % eccentricity (non-dimensional) M = 2.9; % mean anomaly (rad) Niter = 100; % number of iterations for iterative methods E0 = M; E %----- Graphical method EVec = [0:0.001:2*pi]'; y1Vec = sin(EVec); y2Vec = (1/e)*(EVec - M); figure(1);clf; plot(EVec,[y1Vec,y2Vec]); ylim([-1.5 1.5]); grid on; xlabel('Eccentric anomaly E (rad)'); ylabel('y'); title(['Graphical Method for Solving Keplers Eq.: M = '.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: .. num2str(M) ', e = ' num2str(e)]); %----- Successive iterations E = E0; for i = [1:1:Niter] E = M + e * sin(E); end e disp(['E derived from successive iterations: ' num2str(E)]); d %----- Newton-Raphson method E = E0; for i = [1:1:Niter] E = E - ((E - e * sin(E) - M)/ disp(['E derived from Newton-Raphson method: ' num2str(E)]); d %----- Compare convergence of SI vs. NR methods % ????...
View Full Document

This note was uploaded on 09/18/2011 for the course ASE 366K taught by Professor Lightsey during the Fall '08 term at University of Texas at Austin.

Ask a homework question - tutors are online