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

Description Usage Arguments Details Value See Also Examples

View source: R/chebyshev.R

Description

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

Usage

1
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 not used anywhere in the package, it is merely provided as a convenience for those who might need it.

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.

Value

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

See Also

havefftw

Examples

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

chebpol documentation built on Dec. 9, 2019, 5:08 p.m.