Advertisement
hiddenGem

Height of the Image

Jul 26th, 2020
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.32 KB | None | 0 0
  1. %% Height of the Image
  2. % Determines the height of an image in front of diverging lens
  3.  
  4. % Inputs and Variables
  5. focal = input('Focal length?\n');
  6. h = input('Object height\n');
  7. d = input('Object distance\n');
  8.  
  9. % Outputs and Equations
  10. hprime = h*(focal/(focal-d))
  11. fprintf('The height of the image is: %.3e m\n', hprime)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement