Guest User

Untitled

a guest
Jan 18th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. syms M m rho R V G T v
  2. % for earth:
  3.  
  4. M = 5.972 * 10^27 % grams
  5. rho = 5.515 % g/cm^3
  6.  
  7. % M = (10^25) * 1000 % grams
  8. % rho = 3.0 % g/cm^3
  9.  
  10. G = 6.67408 * 10^-11 % m^3 kg^-1 s^-2
  11. % to find the radius
  12.  
  13. V = M / rho %cm^3
  14.  
  15. volume_equ = (4/3)*pi*R^3 == V
  16.  
  17. sol0 = solve(volume_equ, R);
  18. sol0 = sol0(1);
  19. sol0 = double(sol0) / 100; % in meters
  20.  
  21. R = sol0
  22. % at the equator we have
  23. % (mv^2)/R = (GMm)/R^2
  24.  
  25. force_equ = (m*v^2)/R == (G*M*m)/(R^2)
  26.  
  27. sol1 = solve(force_equ, v);
  28. sol1 = sol1(2);
  29. v = double(sol1) % linear speed in m/s
  30.  
  31. period_equ = v == (2*pi*R) / T
  32.  
  33. sol2 = solve(period_equ, T)
  34. T = double(sol2) % in seconds
  35. T_hours = T /(60*60) % in hours
Add Comment
Please, Sign In to add comment