# Fast Chebyshev transform

Version 1.1.0.0 (1.42 KB) by
Fast computation of the Chebyshev transform
Updated 22 Oct 2013

fcht(V) computes the Chebyshev transform of a N+1 by 1 array V. If V corresponds to a function evaluated at the Chebyshev–Gauss–Lobatto points cos(pi*(0:N)/N), then V is interpolated by a linear combinations of the Chebyshev polynomials with weights given by fcht(V).

Example:
Approximate f(x) = exp(x) over [-1,1] as a linear combination of the first three Chebyshev polynomials.

x = cos(pi*(0:2)/2); % establish 3 Chebyshev grid points
V = exp(x); % evaluate f(x) at Chebyshev grid points

a = fcht(V);
xx = linspace(-1,1); % create dense grid over domain
g = a(1)*1 + a(2)*xx + a(3)*(2*xx.^2 - 1); % sum the first three Chebyshev
% polynomials with respect to their corresponding weights
plot(xx,exp(xx),xx,g); % visualize the approximation

### Cite As

Matt (2024). Fast Chebyshev transform (https://www.mathworks.com/matlabcentral/fileexchange/44030-fast-chebyshev-transform), MATLAB Central File Exchange. Retrieved .

##### MATLAB Release Compatibility
Created with R2013a
Compatible with any release
##### Platform Compatibility
Windows macOS Linux

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.1.0.0

matched usual naming convention

1.0.0.0