Spectral methods for wave propagation in Matlab