Advertisement
hiddenGem

Size of Moon's Image

Jul 26th, 2020
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.31 KB | None | 0 0
  1. %% Size of Moon's Image
  2. % Determines teh diameter of the moon's image
  3.  
  4. % Inputs and Variables
  5. f = input('Focal Point\n');
  6. dmoon = input('Diameter of the moon\n');
  7. d = input('Distance from Earth to the Moon\n');
  8.  
  9. % Outputs and Equations
  10. hprime = f*dmoon/d;
  11. fprintf('The image diameter is: %.3e m\n', hprime)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement