% This is for Project 2. % Spatial filtering % Model the spatial filter as a Gaussian wave multiplied by % 3 rect functions to model the spatial noise x=linspace(-2e-3,2e-3,6001); W=1e-3; %diameter of 1 mm F=0.49; period=500e-6; f=16e-3; l=670e-9; slit=zeros(size(x)); for m=-20:20 I=find(abs(x-m*period)