Using a table of initial positions and velocities derived from JPL's "Horisons" System (http://ssd.jpl.nasa.gov/?horizons) , it is possible to predict the motion of all of the elements in the table.
The default table (supplied) contains 25 bodies - the planets of the Solar System (including the moons of Earth, Jupiter and Saturn), Voyager 1 and 2 as well as Halley's Comet. "trajectory_sim.m'' generates a data file, "trajectory_player.m" and ''trajectory_player-animate.m"' will play back the data file.
I welcome any feedback on improving this code.
Stephen Walker (2021). Solar System model (planetary n-body modelling) (https://www.mathworks.com/matlabcentral/fileexchange/26114-solar-system-model-planetary-n-body-modelling), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!