function t = traprule(f,a,b) % % DESCRIPTION : % Returns the trapezoidal rule to approximate % the integral of f over [a,b]. % t = (feval(f,a)+feval(f,b))*(b-a)/2;