A Matlab code that solves the time-dependent Schrödinger equation for light interacting with a two-level atom in the rotating wave approximation.