Learn R Programming

chebpol (version 1.3-952)

chebcoef: Compute Chebyshev-coefficients given values on a Chebyshev grid

Description

Compute the multivariate Chebyshev-coefficients, given values on a Chebyshev grid.

Usage

chebcoef(val, dct=FALSE)

Arguments

val
An array of function values on a Chebyshev grid. The dim-attribute must be appropriately set. If not set, it is assumed to be one-dimensional.
dct
Logical. Since the Chebyshev coefficients are closely related to the DCT-II transform of val, the non-normalized real-even DCT-II coefficients may be retrieved instead. I.e. those from FFTW_REDFT10 in each dimension. This is n

Value

  • An array of Chebyshev-coefficients for an interpolating Chebyshev-polynomial.

concept

Chebyshev polynomial

Details

If val has no dim-attribute, it is assumed to be one-dimensional of length the length of val.

If chebpol was compiled without FFTW, running chebcoef on large grids may be slow and memory-demanding.

See Also

havefftw

Examples

Run this code
## Coefficients for a 2x3x4 grid
a <- array(rnorm(24),dim=c(2,3,4))
chebcoef(a)

Run the code above in your browser using DataLab