Trefethen’s Approximation Theory and Approximation Practice

This new 305-page SIAM book by Nick Trefethen presents a modern approach to approximation by polynomials and rational functions. Much of the theory here underlies the Chebfun software package and almost every page of the book contains examples computed using Chebfun.


The book is certainly a must-read for anyone interested in numerical computation. But the most unusual feature of the book is not immediately obvious: it was entirely produced from 29 MATLAB M-files, one for each chapter. Each M-file contains the book’s text in comment lines intertwined with the MATLAB code that generates the examples and the figures. The book was created by using the MATLAB command publish to generate LaTeX output, which was then run through LaTeX (with a few tweaks for the actual printed book). Nick has made the M-files available at the book’s web page and you can generate the book by running them all through publish.

When I ran publish on one of the M-files it gave a strange error beginning

No method 'createTextNode' with matching signature found for class

and I got the same error whatever M-file I tried to publish. This seems to be caused by a clash with some nonstandard M-file on my path, because if I reset the MATLAB path with the matlabrc command (and then add back chebfun to the path) everything works fine.

One thought on “Trefethen’s Approximation Theory and Approximation Practice

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s