% Fraunhofer Diffraction Pattern % Sinc Function and plot % Similar to Fig. 6.4 p. 136 but now for data relating to lab. % Steven Sahyun 140929; updated 9/30/14 clear; clf; % Clears the variables and the graph window. screen = 50; % distance from slit to screen in cm ymax = 4; % ± range detector moved to capture pattern y = -ymax:0.001:ymax; theta = atan(y./screen); % angular range detector moved. lambda = 650; % wavelength in nm d = 40000; % slit width in nm 40000 nm = 0.04 mm. k=2*pi/lambda; % Wavenumber k x = k*d*sin(theta)/2; % variable to make reading I_theta easier. % sinc(x) = sin(x)/x but I don't want to create a function right now. I_0 = 1; % Maximum intensity I(0) = (E_0*d)^2 eq. 6.8 I_theta = I_0*(sin(x)./x).^2; % Equation 6.9 p. 137 plot(y,I_theta); xlabel('distance (cm)'); ylabel('I(\theta) / I(0)');