Advertisement
hiddenGem

Tired Physics Professor

Jul 26th, 2020
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.30 KB | None | 0 0
  1. %% Tired Physics Professor Reading Fine Print
  2. % Determines the best focal length of lens
  3.  
  4. % Input and Variables
  5. d = input('Distance from glasswear\n');
  6. v = input('Ideal distance from glasswear\n');
  7.  
  8. % Outputs and Equations
  9. f = 1/v-1/d;
  10. f = 1/f;
  11. fprintf('The focal point should be: %.3e m', f);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement