##Constants and initializations
ecc=0.1; ## Eccentricity
M=24.851090; ## Mean anomaly(degrees)
Mr=M*pi/180; ## Mean anomaly (rads)
ser=[]; ## Series in E
for m=1:1000
ser(m)=(1/m)*besselj(1,m*ecc)*sin(m*Mr);
ser(m)+=ser(m);
endfor
E=M+2*ser(m);
save –text BESSELKEPLER.dat
printf('We find E to be %f. This is the answer of Q1(b)\n',E);
ecc=0.1; ## Eccentricity
M=24.851090; ## Mean anomaly(degrees)
Mr=M*pi/180; ## Mean anomaly (rads)
ser=[]; ## Series in E
for m=1:1000
ser(m)=(1/m)*besselj(1,m*ecc)*sin(m*Mr);
ser(m)+=ser(m);
endfor
E=M+2*ser(m);
save –text BESSELKEPLER.dat
printf('We find E to be %f. This is the answer of Q1(b)\n',E);
Comments
Post a Comment