%
% Optical Imaging and Spectroscopy
%
% David J. Brady
% Duke University
% www.opticalimaging.org
%
% Figure 6.5
%
%
% plots of spectral densities
%
%
figure(1);set(gcf,'color','white');
lambda=linspace(-4,4,256);
u=linspace(-2,2,512);
sg=exp(-pi*lambda.^2);
gg=exp(-pi*u.^2);
subplot(2,2,1);plot(lambda,sg,'-k');title('Gaussian spectral density');xlabel('frequency ((\nu-\nu_o)/\sigma_\nu)');ylabel('S(\nu)');
subplot(2,2,2);plot(u,gg,'-k');title('Gaussian mutual coherence');xlabel('time (1/\sigma_\nu)');ylabel('|\Gamma(\tau )|');
sl=1./(lambda.^2 +1);
gl=exp(-2*pi*abs(u));
subplot(2,2,3);plot(lambda,sl,'-k');title('Lorentzian spectral density');xlabel('frequency ((\nu-\nu_o)/\sigma_\nu)');ylabel('S(\nu)');
subplot(2,2,4);plot(u,gl,'-k');title('Lorentzian mutual coherence');xlabel('time (1/\sigma_\nu)');ylabel('|\Gamma(\tau )|');