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 not used anywhere in the package, it is merely provided
as a convenience for those who might need it.
Value
An array of Chebyshev-coefficients for an interpolating
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.