matrix = imread('doubleslitpattern.bmp'); figure(1); for n=1:15 subplot(16,2,2*n-1); plot(matrix(n,750:1250)); subplot(16,2,2*n); fftdimage = fftshift(abs(fft(matrix(n,:))).^2); fftdimage2 = fftdimage; fftdimage(1015:1035) = zeros(1,21); % Supress zero-order light plot(fftdimage); end linearlaser = zeros(256,3); for i=linspace(1,256,256) linearlaser(i,1:3)=[i/256,0,0]; end subplot(16,2,31); imagesc(matrix(:,750:1350)) colormap(linearlaser)