hiddenGem

Diopter of a Lens

Jul 26th, 2020 (edited)
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.32 KB | None | 0 0
  1. %% Diopter of a Lens
  2. % Determines the radius of the curvature of the inner surface of a lens
  3.  
  4. % Inputs and Variables
  5. D = input('Diopters\n');
  6. u = input('Index of refraction\n');
  7. d = input('Distance from point to edge of lens\n');
  8.  
  9. % Outputs and Equations
  10. R = 1/(-D/(u-1)+(1/d));
  11. fprintf('The radius is: %.3e m\n',R);
Add Comment
Please, Sign In to add comment