FourierBasis: Fourier basis functions

Description Usage Arguments Value References Examples

View source: R/FourierBasis.R

Description

Computes the values of the one-dimensional Fourier basis functions at a vector of locations x and with a vector of frequencies m. The scaling factor of is included, so that the function returns, e.g., √{2} \cos(2π m x).

Usage

1
FourierBasis(a, m, x)

Arguments

a

Sine or cosine; a=0 gives cosine and a=1 gives sine.

m

Vector of frequencies m.

x

Vector of locations x.

Value

Returns the values of √{2} \cos(2π m x).

References

\insertRef

BKS2020USP

Examples

1
2
3
e=FourierBasis(1,1:100,0.01); plot(0.01*(1:100),e,type="l")
e=FourierBasis(0,1,0.01*(1:100)); plot(0.01*(1:100),e,type="l")
FourierBasis(1,1:3,0.1*(1:10))

USP documentation built on Jan. 27, 2021, 5:08 p.m.

Related to FourierBasis in USP...