RFF: Evaluate an RFF (random wave function) at given input

Description Usage Arguments Value Examples

View source: R/RFF.R

Description

Evaluate an RFF (random wave function) at given input

Usage

1
RFF(x, freq, mag, dirr, offset, wave = sin, noise = 0)

Arguments

x

Matrix whose rows are points to evaluate or a vector representing a single point. In 1 dimension you must use a matrix for multiple points, not a vector.

freq

Vector of wave frequencies

mag

Vector of wave magnitudes

dirr

Matrix of wave directions

offset

Vector of wave offsets

wave

Type of wave

noise

Standard deviation of random normal noise to add

Value

Output of RFF evaluated at x

Examples

1
2
3
4
curve(RFF(matrix(x,ncol=1),3,1,1,0))
curve(RFF(matrix(x,ncol=1),3,1,1,0, noise=.1), n=1e3, type='p', pch=19)

curve(RFF(matrix(x,ncol=1),c(3,20),c(1,.1),c(1,1),c(0,0)), n=1e3)

TestFunctions documentation built on May 2, 2019, 2:42 a.m.