gradient: Gradient using finite differences

Description Usage Arguments Value Examples

View source: R/gradient.R

Description

This function takes the gradient of f using finite differences

Usage

1
gradient(f, binsize)

Arguments

f

vector with N samples

binsize

scalar of time samples

Value

g vector with N samples which is the gradient of f

Examples

1
2
data("simu_data")
out = gradient(simu_data$f[,1],mean(diff(simu_data$time)))

fdasrvf documentation built on Sept. 22, 2017, 1:03 a.m.