trapz | R Documentation |
Trapezoidal integration in 1 or 2 dimensions
trapz(h, fx)
h |
A length |
fx |
A |
The trapezoidal approximation of the integral.
# 1D example
trapz(h = 1, fx = 1:10)
# 2D example
trapz(h = c(1,1), fx = matrix(1:10, nrow = 2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.