function a = gaussianwindow(l, sd)
% a = gaussianwindow(l, sd)
% l is the length of the window
% sd is the number of standard deviations in the window

a = exp( -( ((1:l)' - l/2).^2 / (2 * (l/sd).^2) ) );