Sample codes
See also Homework format for some other examples.
- spectral1.ipynb shows an IPython notebook
illustrating the use of Chebfun for spectral methods, following the
examples of Chapter 21 of ATAP.
- Fourier-Spectral.ipynb
shows an IPython notebook
illustrating Fourier spectral methods in Matlab, following SMM Chapter 3,
and also Python versions.
- Spectral-Advection.ipynb
shows an IPython notebook
illustrating solving the advection equation with a Chebyshev spectral
method.
- Spectral-Heat.ipynb
shows an IPython notebook
illustrating solving the heat equation with a Chebyshev spectral
method.
- Spectral-eigenvalues.ipynb
shows an IPython notebook
illustrating the solution of eigenvalue problems using code from
Chapter 9 of SMM.