powered by
Make fourier basis
make.fourier.basis(range, order, use.trig.id = FALSE)
Left and right end points.
Order of harmonics
Use trigonometrical identities with this function?
Function of class "fctbasis"
The number of basis elements (degrees of freedom) is 2 * order + 1.
The basis functions are ordered [1, sin(t), cos(t), sin(2t), cos(2t), ...]
Using trigonometrical identities is faster, but introduces (negligible) round-off errors.
Functional basis function
# NOT RUN { ## A fourier basis with period 1 and 11 basis functions. bf <- make.fourier.basis(c(0,1), order = 5) # }
Run the code above in your browser using DataLab