simp_int | R Documentation |
This function computes the Simpson method to calculate an integral.
simp_int(x, fx, n.pts = 256, ret = FALSE)
x |
The vector where the integral is computed |
fx |
The function to integrate |
n.pts |
The number of points used to compute the integral through the Simpson technique. |
ret |
A boolean control parameter. Default value is FALSE. |
Returns the value of the integral.
W. E. Wansouwé, F.G. Libengué and C. C. Kokonendji
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.