Learn R Programming

fctbases (version 1.1.1)

make.fourier.basis: Make fourier basis

Description

Make fourier basis

Usage

make.fourier.basis(range, order, use.trig.id = FALSE)

Arguments

range

Left and right end points.

order

Order of harmonics

use.trig.id

Use trigonometrical identities with this function?

Value

Function of class "fctbasis"

Details

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.

See Also

Functional basis function

Examples

Run this code
# 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