powered by
This function computes the Simpson method to calculate an integral.
simp_int(x, fx, n.pts = 256, ret = FALSE)
The vector where the integral is computed
The function to integrate
The number of points used to compute the integral through the Simpson technique.
A boolean control parameter. Default value is FALSE.
Returns the value of the integral.
# NOT RUN { Vec=rgamma(100,1.5,2.6) x=seq(min(Vec),max(Vec),length.out=100) simp_int(x,dgamma(x,1.5,2.6)) # }
Run the code above in your browser using DataLab