This is a simple, yet useful Bloch equation simulator
that runs in Matlab. It is written as a MEX function so
that it can run reasonably quickly, and simulate RF and
a 1D gradient waveform. Simulations can be run for a range
of spatial offsets and frequency offsets.
Sample Application
As an example, consider the RF and gradient shown in Figure 1
below. If these are simulated over a frequency range [-200,200Hz]
and a spatial range [-2,2cm], the resulting signal is shown
by the image in Figure 2.