%% Animation of Gaussian wave packet

% Input parameters

trange = 0:1:200;  % Time range to plot

params.a = 1; % Initial wave packet amplitude (arbitrary)
params.k0 = 1; % Wave packet carrier wavenumber
params.xwidth = 5; % Standard width of Gaussian envelope
np = 128; % Number of wavenumbers for FFT (should be power of 2)
L = 100; % Domain size
params.x = (0:np)/np*L; % Gridpoints at which to plot surface height eta
params.plotOmegaQuadraticFit = true; % Plot evolution with quadratic fit 
                                      % to om(k) around k0

clf
GaussPacket(0,params)  % Plot wave packet at t=0

%% Animation

for t = trange
  GaussPacket(t,params)
  getframe;
end

