FourierBasis: Finds the Discrete Fourier Transformation Matrix

Description Usage Arguments Value Examples

View source: R/basis.R

Description

Uses the package fda to find a transformation matrix where the columns are the different Fourier basis functions, evaluated at specified points along the rows of the matrix.

Usage

1
FourierBasis(tlist, N, train = NULL)

Arguments

tlist

an array of the specific points where the basis functions are evaluated at.

N

number of basis functions in the matrix.

train

indices corresponding to which rows of the matrix to keep. Default is to keep all rows.

Value

A P x N discrete Fourier transformation matrix where P is equal to the length of train and N is the number of basis. If train is NULL then P equals the length of tlist.

Examples

1
2
3
4
5
6
7
8
# Points to evaluate the basis functions at
points <- c(0,1,2,3,4)
# Find first 8 Fourier basis functions evaluted at "points"
f <- FourierBasis(points, 8)

# Find first 8 Fourier basis functions evaluated at "points" but only keep
# last two rows
f <- FourierBasis(points, 8, train = c(4,5))

bcs documentation built on May 29, 2017, 11:58 a.m.