	function E = solveKepler(M,e)

%	E = solveKepler(M,e);
%
% Calculates eccentric anomalies given mean anomaly, and eccentricity.
% All angles in radians.  Takes matrices, vectors, or scalar input.

	x = zeros(size(M));
	delta = Inf;

while delta >1.e-06
	x1 = e.*sin(M+x);
	delta = max(max(x1-x));
	x = x1;
end
	E = x + M;
