blob: e99472444d70535a9ea35bfc7a92c6dd4c9a25b8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
//Variable Declaration
M=205 //Mean anomaly(degrees)
e=0.0025 //Eccentricity
E=%pi //Initial guess value for eccentric anomaly
//Calculation
function [y] = f(E)
y=M-E+e*sin(E)
endfunction
E=fsolve(3.142,f)
printf("The Eccentric anomaly is: %.4f degrees",E)
|