function mout = delay(delta,offset,r1,r2,m0,minp) %DELAY % Applies a Bloch evolution operator to the magnetization column vector 'minp'. % delta ... is the delay duration in seconds, % r1 ... is the magnetization component's longitudinal relaxation rate in 1/sec % r2 ... is the magnetization component's transversal relaxation rate in 1/sec % offset ... is the magnetization component's offset from resonance in Hz % m0 ... is the magnetization component's equilibrium magnetization (weight) % The rotated magnetization is returned in the column vector 'mout' % For the relevant theory, see % www.ebyte.it\library\educards\nmr\NmrMath_PulseAndDelayOps.html e1 = exp(-r1*delta); e2 = exp(-r2*delta); ce = e2*cos(offset*delta); se = e2*sin(offset*delta); mout = [ce*minp(1)+se*minp(2);-se*minp(1)+ce*minp(2);(1-e1)*m0+e1*minp(3)];