Find a initial guess
显示 更早的评论
I am extremely new in matlab and i want to find a decent initial guess theta0 for theta by using kepler's equation,
theta - e*sin(theta) = M
e = 0.2 and M = 1.032
回答(1 个)
John D'Errico
2014-2-28
编辑:John D'Errico
2014-2-28
So for a given value of e and M, you need to solve for theta.
Why do you need a good initial guess anyway? It would seem easy enough to just throw FZERO at it, so is this a homework assignment?
e = 0.2;
M = 1.032;
fun = @(theta) theta - e*sin(theta) - M;
Graphical methods are always a good idea. That plot should point out something obvious, i.e., that for e < 1, there is a unique solution, and that almost any scheme will work.
fzero(fun,0)
ans =
1.2198
So again, why make more work for yourself than you need? Oh, yeah, this is homework. 0 is a good initial guess.
I suppose if you insist, as long as e is less than 1, you can approximate the function as
theta = M
Essentially, it is dominated by the linear term. So a good initial guess for theta is just M.
If e > 1, then there are potentially multiple solutions. But even then, theta=M is as good as any other initial guess, and it is trivial to find.
类别
在 帮助中心 和 File Exchange 中查找有关 Numeric Solvers 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!