%Chapt2Fig3b.m
%200 THz electric field modulated by Gaussian envelope;
clear;
clf;

tau0=14.14E-15;			%time constant (s)
tau02=tau0^2;

w0=2*pi*200.E12;		%200 THz optical frequency (rad s-1)

npoints=500;			%number of points plotted
wmax=2.E15;				%maximum frequency (rad s-1)
wstep=wmax/npoints		%time step (s)

w=[0:wstep:wmax];		%time [start:increment:stop]   

y=(1/2)*exp((-(w-w0).^2)*tau02/2);  %divide spectral intensity by tau02

figure(1);
plot(w,y,'b');			%electric field intensity as function of frequency
axis([0,wmax,0,0.5]);
temp2=['Chapt2Fig3a, \omega_0 = 2\pi x ',num2str(w0/1e12/2/pi),...
    ' T rad s^{-1}, \tau_0 = ',num2str(tau0*1e15),' fs'];
title(temp2);
xlabel(['Frequency, \omega (rad s^{-1})']);
ylabel(['Spectral intensity / \tau_0^2']);


