Advertisement
hiddenGem

Slit Spacing

Jul 26th, 2020
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.49 KB | None | 0 0
  1. %% Slit Spacing
  2. % Determines the distance between two slits and the distance between the
  3. % central and mth bright fringe after the screen is moved
  4.  
  5. % Inputs and Variables
  6. m = input('What order\n');
  7. lambda = input('Wavelength\n');
  8. x = input('x = \n');
  9. y = input('y = \n');
  10. move = input('Distance screen moved\n');
  11.  
  12. % Outputs and Equations
  13. d = m*lambda*x/y;
  14. xprime = x+move;
  15. yprime = m*lambda*xprime/d;
  16. fprintf('The distance between the slits: %.3e m\nThe new y distance: %.3e m',d,yprime)
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement