Evaluate an RFF (random wave function) at given input
RFF(x, freq, mag, dirr, offset, wave = sin, noise = 0)
Output of RFF evaluated at 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.
Vector of wave frequencies
Vector of wave magnitudes
Matrix of wave directions
Vector of wave offsets
Type of wave
Standard deviation of random normal noise to add
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)
Run the code above in your browser using DataLab