Advertisement
ksoltan

jupiter.m

Nov 30th, 2015
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.27 KB | None | 0 0
  1. % Simulate the orbit of Jupiter around the Sun.
  2. m = 1.8986 * 1e27;
  3. dist_from_sun = 7.779 * 1e11;
  4. init_v = 13.06 * 1e3;
  5. days = 4332;
  6. % Compute the orbit of the planet
  7. [TJup, YJup] = orbit(m, dist_from_sun, init_v, days);
  8. figure(3)
  9. % Animate
  10. animate_orbit(TJup, YJup)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement