Learn R Programming

RSEIS (version 4.2-4)

trapz: Integrate using trapezoidal rule

Description

Integrate using trapezoidal rule

Usage

trapz(y, dt, rm.mean=TRUE)

Value

vector: Integrated signal

Arguments

y

Input signal

dt

sample interval time, seconds

rm.mean

logical, whether to remove the mean prior to integration (TRUE)

Author

Jonathan M. Lees<jonathan.lees@unc.edu>

Examples

Run this code
x <- rnorm(100)
trapz(x, 0.01)

Run the code above in your browser using DataLab