Do a straight forward evaluation of the function.
% N.B.: alpha = args(1)
% beta = args(2)
% gamma = args(3)
expthing = exp(-args(2)*ts_even); % ts_even for the convolution
c = nconv(shifted_g_even,expthing,ts_even(2)-ts_even(1));
c = c (1:length(ts_even)); % chop off points outside of the time
% domain we're interested in
% Calculate the two main terms of the expression, alpha * (convoluted
% stuff) and gamma * (shifted activity), and sum them.
i1 = args(1)*c; % alpha * (convolution)
i2 = args(3)*shifted_g_even; % gamma * g(t - delta)
i = i1+i2;
integral = nframeint (ts_even, i, fstart, flengths);