# RFF: Evaluate an RFF (random wave function) at given input In TestFunctions: Test Functions for Simulation Experiments and Evaluating Optimization and Emulation Algorithms

 RFF R 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 May 29, 2024, 11 a.m.