This paper presents a general method for simulating the effect of chemical exchange on MAS NMR spectra of solid samples. The complication in MAS spectra is that the Hamiltonian itself is time-dependent, due to the spinning of the sample. The approach taken in this work is to use Floquet theory to convert the problem into a time-independent form, and then use established methods (used in liquid NMR simulations) to calculate the lineshape. Floquet ...