%
%
% Optical Imaging and Spectroscopy
%
% David J. Brady
% Duke University
% www.opticalimaging.org
%
% Figure3.5
%
%
% exp(-2 pi i del u) rect(u)- DFT (sinc(x-del))
%
%
del=0.01;
figure(1);set(gcf,'color','white');
N=4;
hatf=abs(exp(-2*pi*i*del*(-N/2:(N/2-1))/N)-fftshift(fft(fftshift(sinc((-N/2:(N/2-1))-del)))));
plot(linspace(-.5,.5,N),hatf,'-k');
hold;
N=8;
hatf=abs(exp(-2*pi*i*del*(-N/2:(N/2-1))/N)-fftshift(fft(fftshift(sinc((-N/2:(N/2-1))-del)))));
plot(linspace(-.5,.5,N),hatf,'-k');hold on;
N=16;
hatf=abs(exp(-2*pi*i*del*(-N/2:(N/2-1))/N)-fftshift(fft(fftshift(sinc((-N/2:(N/2-1))-del)))));
plot(linspace(-.5,.5,N),hatf,'-k');hold on;
N=32;
hatf=abs(exp(-2*pi*i*del*(-N/2:(N/2-1))/N)-fftshift(fft(fftshift(sinc((-N/2:(N/2-1))-del)))));
plot(linspace(-.5,.5,N),hatf,'-k');hold on;
N=64;
hatf=abs(exp(-2*pi*i*del*(-N/2:(N/2-1))/N)-fftshift(fft(fftshift(sinc((-N/2:(N/2-1))-del)))));
plot(linspace(-.5,.5,N),hatf,'-k');hold on ;