trapezoidalIntegration(@(x)( exp(-(x.^2)) ),0,10,100000) ans = 0.886226925452753