INTERFERENCE Demonstration of interference
by Chuck DiMarzio Northeastern University May 2009
!! This file may be copied, used, or modified for educational and !! research purposes provided that this header information is not !! removed or altered, and provided that the book is cited in !! publications, as DiMarzio, Charles A., Optics for Engineers, !! CRC Press, Boca Raton, FL, 2011. !! http://www.crcpress.com !! Other distribution is prohibited without permission.
Contents
Set parameters
lambda=10.59e-6; % Wavelength in meters for co2 laser c=299792458; % m/s f=c/lambda; tstep=1/f/50; % Step for plotting tmax=20/f; % Max time to plot tau=8/f; % Pulse length t=(0:tstep:tmax); % Time axis
Set fields for demonstration
field1=1.5*cos(2*pi*f*t).*(t<tau); % Reference % % field2inphase=cos(2*pi*f*t).*(t<tau); % Different signal fields field2neg=-field2inphase; field2quad=sin(2*pi*f*t).*(t<tau); field2delay=sin(2*pi*f*t).*(t<2.5*tau).*(1.5*tau<t);
Compute sums
inphase=field1+field2inphase; quad=field1+field2quad; neg=field1+field2neg; delay=field1+field2delay;
Plot
fig1=figure;plot(t*1e15,field2inphase); axis([0,tmax*1e15,-2.5,2.5]);xlabel('t, time, fs');ylabel('E'); fig3=figure;plot(t*1e15,field2quad); axis([0,tmax*1e15,-2.5,2.5]);xlabel('t, time, fs');ylabel('E'); fig5=figure;plot(t*1e15,field2neg); axis([0,tmax*1e15,-2.5,2.5]);xlabel('t, time, fs');ylabel('E'); fig7=figure;plot(t*1e15,field2delay); axis([0,tmax*1e15,-2.5,2.5]);xlabel('t, time, fs');ylabel('E'); fig2=figure;plot(t*1e15,inphase); axis([0,tmax*1e15,-2.5,2.5]);xlabel('t, time, fs');ylabel('Sum'); fig4=figure;plot(t*1e15,quad); axis([0,tmax*1e15,-2.5,2.5]);xlabel('t, time, fs');ylabel('Sum'); fig6=figure;plot(t*1e15,neg); axis([0,tmax*1e15,-2.5,2.5]);xlabel('t, time, fs');ylabel('Sum'); fig8=figure;plot(t*1e15,delay); axis([0,tmax*1e15,-2.5,2.5]);xlabel('t, time, fs');ylabel('Sum'); fig9=figure;plot(t*1e15,field1); axis([0,tmax*1e15,-2.5,2.5]);xlabel('t, time, fs');ylabel('E');








