% Function to evaluate the second moment of the negative exponential
% BETA is a global variable containing the mean (parameter) of the distribution

function f = negexpf(t);
global BETA

f = (t/BETA) .* exp(-t/BETA);
