Computer simulation of multipulse and Fourier transform NMR experiments. I. Simulations using the Bloch equations