Advertisement
hiddenGem

Concave Mirror

Jul 26th, 2020
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.27 KB | None | 0 0
  1. %% Concave Mirror
  2. % Determines how far in front of a mirror an image is located
  3.  
  4. % Inputs and Variables
  5. focal = input('Focal Point\n');
  6. d = input('Distance from mirror\n');
  7.  
  8. % Outputs and Equations
  9. v = 1/focal-1/d;
  10. v = 1/v;
  11. fprintf('The image is located: %.3e m',v)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement