Posted By

Dalroc on 05/06/14


Tagged


Versions (?)

Greek Heaven


 / Published in: MatLab
 

URL: GreekHeaven

For Reddit

  1. G = 6.67*10^-11;
  2. M = 5.9721986 * 10^24;
  3. m = 1.970 * 10^3;
  4. t = 1;
  5. D = 585000000;
  6.  
  7. v = 0;
  8. d = 0;
  9.  
  10. for i=1:777600
  11. d = d + v*t + G*M*t^2/(2*(D-d)^2);
  12. v = v + G*M*t/(D-d)^2;
  13. end
  14.  
  15. d
  16. v

Report this snippet  

You need to login to post a comment.