function f2 = integrate(f)

f2 = cumsum(f);

%% If you do not have the function "cumsum",
%% then remove the line above and uncomment the code below
%% It is slower, but it works.
%f2 = zeros(1,length(f));
%f2(1) = f(1);
%for i = 2:length(f)
%    f2(i) = f2(i-1) + f(i);
%end

