Modifying quadrature1D.m, should be right this time around