two_body_simulation_test, a MATLAB program which calls two_body_simulation() to simulate the solution of the planar two body problem.
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
two_body_simulation, a MATLAB program which simulates the behavior of two bodies, constrained to lie in a plane, moving under the influence of gravity, with one body much more massive than the other.
INITIAL_ORBIT simulates the problem over approximately two orbits.
ORBITAL_DECAY computes about twenty successive orbits, showing how the orbit gradually decays to a more elliptical form.