generate_basis {SpatFD} | R Documentation |
Creates functional ortogonal basis as fd object.
Description
This function returns the first nth elements of a functional basis as an fd object.
Usage
generate_basis(basis = "Fourier",n_functions = 10,L = NULL,fda_basis = NULL)
Arguments
basis |
Name of the functional basis. Currently only |
n_functions |
Positive integer giving the number of functions that are going to be generated. |
L |
For |
fda_basis |
|
Details
Fourier basis functions are given by:
for , and
for .
Furthermore, Legendre basis functions are given by:
for .
Value
fda::fd
object with n_functions
curves.
Note
Generating Legendre basis functions requires to evaluate
derivates, so its recomended to use values below 10.
Author(s)
Samuel Sánchez Gutiérrez ssanchezgu@unal.edu.co.
References
Conway, J. B. (2019). A course in functional analysis (Vol. 96). Springer.
See Also
Examples
library(fda)
# 10 Fourier functions
res <- generate_basis(L=1)
plot(res)
# 20 Fourier functions
res <- generate_basis(n_functions = 20,L = 3)
plot(res)
# 10 Legendre functions
res <- generate_basis(basis = "Legendre")
plot(res)
# 7 Legendre functions
res <- generate_basis(basis = "Legendre", n_functions = 7)
plot(res)