You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Consider using atan2 instead of atan for the inverselliptic2.m because it's
more stable and you won't need the eps for the denominator.
- My project required plugging in large numbers in the inverselliptic2.m
function, which won't work because there's only 4 iterations. So I'd recommend
using a while loop:
[~, E] = elliptic12(invE(:),m,tol);
dinvE = (E - z)./sqrt( 1-m.*sin(invE(:)).^2 );
while max(abs(dinvE)) > tol
invE(:) = invE(:)-dinvE;
[~, E] = elliptic12(invE(:),m,tol);
dinvE = (E - z)./sqrt( 1-m.*sin(invE(:)).^2 );
end
invE(:) = invE(:)-dinvE;
instead of:
for iter=1:4
[~, E] = elliptic12(invE(:),m,tol);
invE(:) = invE(:)-(E - z)./sqrt( 1-m.*sin(invE(:)).^2 );
end
Original issue reported on code.google.com by [email protected] on 5 Jan 2014 at 9:08
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 5 Jan 2014 at 9:08The text was updated successfully, but these errors were encountered: