Code covered by the BSD License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

Highlights from Fast Chebyshev transform

Be the first to rate this file! 4 Downloads (last 30 days) File Size: 1.42 KB File ID: #44030 Version: 1.1

Fast Chebyshev transform

by

Matt (view profile)

21 Oct 2013 (Updated )

Fast computation of the Chebyshev transform

File Information
Description

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

Required Products MATLAB
MATLAB release MATLAB 8.1 (R2013a)
Tags for This File   Please login to tag files.