SPECFEM1D simulates seismic wave propagation in a one-dimensional heterogeneous medium. It is a small code that allows users to learn how a spectral-element program is written.