Path: Orbit/OrbitSim
% Propagate n-bodies in an n-body problem. Inputs are the initial state vector, the time vector and the gravitational parameters. The demo is earth orbit and another for Alpha-Centauri including A and B and a hypothetical planet at 1 AU from Alpha-Centauri A. This function includes the right-hand-side and uses ode113 for propagation. -------------------------------------------------------------------------- Form: x = PropagateNBody( x0, t, mass, name, tol, eps ) -------------------------------------------------------------------------- ------ Inputs ------ x0 (6*n,1) State vector [r;v;r;v;r;v...] t (1,:) Time vector (1,:) Masses name {:} Name of body tol (1,2) [abs rel] ------- Outputs ------- x (6*n,:) State vector -------------------------------------------------------------------------- References: http://www.physics.buffalo.edu/phy302/topic1/index.html http://www.scholarpedia.org/article/N-body_simulations --------------------------------------------------------------------------
Common: Database/Constant Common: Graphics/AssignColors Common: Graphics/NewFig Common: Graphics/Plot2D Common: Graphics/TimeLabl Common: Graphics/TitleS Math: Linear/Mag Orbit: OrbitCoord/RPRA2AE SC: BasicOrbit/El2RV
Back to the Orbit Module page