Fast Chebyshev differentiation

Versione 1.2.0.0 (1,58 KB) da Matt
Fast computation of the first derivative of data located along Chebyshev points
327 download
Aggiornato 22 ott 2013

Visualizza la licenza

fchd(V) computes the first derivative of the data in V located along the N+1 Chebyshev–Gauss–Lobatto points cos(pi*(0:N)/N).


Example 1:
Use FCHT to differentiate the function f(x) = tan(x) over [-1,1], and
compare with the exact derivate f'(x) = sec(x)^2.

x = cos(pi*(0:10)/10); % create sparse Chebyshev-spaced grid of 11 points
xx = linspace(-1,1); % create dense, linearly spaced grid
plot(xx,sec(xx).^2,x,fchd(tan(x))); % compare Chebyshev derivative to exact


Example 2:
To show the spectral convergence property of the Chebyshev derivative,
compute the error between the Chebyshev derivative and the exact
derivative of f(x) = tan(x) for several N.

N = 1:30;
err = zeros(1,length(N));

for n = N
x = cos(pi*(0:n)/n)'; % establish grid
err(n) = max(sec(x).^2 - fchd(tan(x))); % compute error
end

loglog(N,err); %display

Cita come

Matt (2026). Fast Chebyshev differentiation (https://it.mathworks.com/matlabcentral/fileexchange/44034-fast-chebyshev-differentiation), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2013a
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Polynomials in Help Center e MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Versione Pubblicato Note della release
1.2.0.0

made title match usual naming convention

1.0.0.0