function I = Barras(f, a, b, N)

h = abs(b-a)/N;

suma = 0;
for k=0:N-1
    suma = suma + f(a+h*k);
end;

I = suma*h;

end