{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ASE 366K - Kepler Equation Temp

# ASE 366K - Kepler Equation Temp - num2str(M e = num2str(e...

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

% 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 = '...
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

{[ snackBarMessage ]}

Ask a homework question - tutors are online