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

View source: R/RFF.R

RFFR Documentation

Evaluate an RFF (random wave function) at given input

Description

Evaluate an RFF (random wave function) at given input

Usage

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

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 Sept. 30, 2024, 9:31 a.m.