Lloyd N. Trefethen, Spectral Methods in MATLAB, SIAM, Philadelphia, 2000
This 160-page book is built around forty short Matlab programs, or "M-files", which do everything from demonstrating spectral accuracy on functions of varying smoothness to solving the Poisson, biharmonic, Orr-Sommerfeld, KdV, and Allen-Cahn equations.
A glaring omission in the book is that it does not treat barycentric interpolation (apart from a few exercises); this is a simple, powerful tool that anyone using spectral methods should be aware of. See the papers by Berrut and T. and also Chebfun, a spectral-style system for dealing with functions in object-oriented MATLAB.
Front matter, Chapter 1, Chapter 6, Chapter 9
Same material in pdf format
cheb.m, chebfft.m, gauss.m, clencurt.m
p1.m, p2.m, p3.m, p4.m, p5.m, p6.m, p6u.m, p7.m, p8.m, p9.m, p10.m, p11.m, p12.m, p13.m, p14.m, p15.m, p16.m, p17.m, p18.m, p19.m, p20.m, p20u.m, p21.m, p22.m, p23.m, p23a.m, p24.m, p24fine.m, p25.m, p26.m, p27.m, p28.m, p28b.m, p29.m, p30.m, p30b.m, p30c.m, p31.m, p32.m, p33.m, p34.m, p35.m, p36.m, p37.m, p38.m, p39.m, p40.m
All the M-files (text)
All the M-files (zip archive)
All the M_files (gzipped tar archive)
List of known errata
Oxford University Mathematical Institute
Oxford OX2 6GG
Return to L. N. Trefethen homepage