function [ f, x ] = ind_int_trpz( xi, xf, N, g )
%UNTITLED3 Summary of this function goes here
%   Detailed explanation goes here

x=linspace(xi,xf,N);
dx=x(2)-x(1)
gv=g(x);

il=(1:1:N-1); ir=(2:1:N);
f(1)=0;
f(ir)=cumsum( (gv(il)+gv(ir))/2 *dx );


end

