Returns the Chebyshev interpolation coefficients. The amplitude of the coefficients decreases exponentially and the last coefficient offers an estimate of the relative accuracy of the interpolation.
Supported Product: FDTD, MODE
Returns the Chebyshev interpolation coefficients of a sampled function f. The function f must be sampled on a Chebyshev roots grid.
If option=1 is selected, the vector x will not include the endpoints
If option=2 is selected, the vector x will include the endpoints
This example shows how to obtain interpolation coefficients from a sampled function:
Nc = 15; # Number of sample points
xmin = 0;
xmax = 1;
x = chpts(xmin,xmax,Nc,1); # Returns Chebyshev roots grid on interval between xmin and xmax
f = exp(1i*2*pi*x); # Function sampling using Chebyshev grid
coeff = dcht(f,1); # Get interpolation coefficients