View source: R/basis_functions.R
make.fourier.basis | R Documentation |
Make fourier basis
make.fourier.basis(range, order, use.trig.id = FALSE)
range |
Left and right end points. |
order |
Order of harmonics |
use.trig.id |
Use trigonometrical identities with this function? |
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.
Function of class "fctbasis"
Functional basis function
## A fourier basis with period 1 and 11 basis functions. bf <- make.fourier.basis(c(0,1), order = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.