% Bloch Equation Simulation, Excercise F-2a
% -----------------------------------------
% 

t = 0:.004:6;		% in ms.
dT = t(2)-t(1);		% in ms.
rf = .05*sinc(t-3);	% in G.

flips = 2*pi*4258*rf*(dT/1000);	% Rotation in radians.

stem(t,flips);
xlabel('Time (ms)');
ylabel('Flip (rad)');

netflip=sum(flips)*180/pi;
tt = sprintf('Net flip is %f degrees',round(netflip));
disp(tt);


