intg: Integration

Description Usage Arguments Details Author(s) Examples

Description

This function calculates the integration of y with respect to x.

Usage

1
intg(y, x)

Arguments

x

a vector of real values, not necessarily sorted.

y

a vector of function values at x.

Details

(x,y)s are sorted according to ascending x values and then the integration is calculated as sum of the products of average of adjacent y values and the difference of adjacent x values.

Author(s)

Xiaochun Li

Examples

1
2
3
x <- seq(0, 1,length=100)
y <- x^2
intg(y, x)

PROcess documentation built on Nov. 8, 2020, 5:44 p.m.