Learn R Programming

fdapace (version 0.6.0)

CreateBasis: Create an orthogonal basis of K functions in [0, 1], with nGrid points.

Description

Create an orthogonal basis of K functions in [0, 1], with nGrid points.

Usage

CreateBasis(
  K,
  pts = seq(0, 1, length.out = 50),
  type = c("cos", "sin", "fourier", "legendre01", "poly")
)

Value

A K by nGrid matrix, each column containing an basis function.

Arguments

K

A positive integer specifying the number of eigenfunctions to generate.

pts

A vector specifying the time points to evaluate the basis functions.

type

A string for the type of orthogonal basis.

Examples

Run this code
basis <- CreateBasis(3, type='fourier')
head(basis)

Run the code above in your browser using DataLab