% % Optical Imaging and Spectroscopy % % David J. Brady % Duke University % www.opticalimaging.org % % Figure 4.14% % impulse response plots % fnumber=1; apertureRange=-1:.01:1; [x,y]=meshgrid(apertureRange,apertureRange); figure(1);set(gcf,'color','white'); colormap(1-gray(256)); field=sqrt(x.^2+y.^2); subplot(2,2,1);imagesc(apertureRange,apertureRange,P(field)); title('Transfer Function'); axis square; subplot(2,2,3);plot(apertureRange,P(apertureRange),'-k'); axis([-1 1 0 1.5]); xlabel('1/\lambda f/#'); fourierRange=-20:.1:20; [x,y]=meshgrid(fourierRange,fourierRange); field=sqrt(x.^2+y.^2); subplot(2,2,2);imagesc(fourierRange,fourierRange,jinc(field./fnumber)); title('impulse response'); axis square; subplot(2,2,4);plot(fourierRange,real(jinc(fourierRange./fnumber)),'-k'); xlabel('1/\lambda f/#'); axis([-20 20 -.5 1.2]);