clear all; close all; clc;

% Simple script for 1D Gaussian initial condition E distribution.
sig = 5; k0 = 1; % Set params. 'sig' is \bar{\sigma} from the paper and is in \ell. k0 is k_0, and is in 1/\ell.
E = (0.01:0.01:2); % Energy vector to plot over, in E_0. Can change to best suit the distribution. Note: distribution diverges at E=0.

f = exp(-2*sig^2*(sqrt(E)-k0).^2)/2./sqrt(E);
normy = trapz(E,f)
f = f/normy;
plot(E,f,'bo'); grid on;

trapz(E,E.*f) % Can calculate the mean energy of the distribution if you like.
