integrate_trapeze: integrate_trapeze

View source: R/basic_functions.R

integrate_trapezeR Documentation

integrate_trapeze

Description

Trapezoidal rule to approximate an integral.

Usage

integrate_trapeze(x, y)

Arguments

x

a numerical vector, the discretization of the domain.

y

a numerical value, the discretization of the function to integrate.

Value

a numerical value, the approximation.

Examples

x <- seq(0,1,le=1e2)
integrate_trapeze(x,x^2)

integrate_trapeze(data1$grids[[1]],t(data1$x[[1]]))

bliss documentation built on May 29, 2024, 8:35 a.m.