% Bloch Equation Simulation, Excercise C-3e
% -----------------------------------------
% 


% 	Ranges of TE and TR to use.

ETL = [1:60];
TE = 15;
TR = 3000;

T11 = 600;
T21 = 100;
T12 = 1000;
T22 = 150;

for k=1:length(ETL)
	S1(k) = sum(abs(fsesignal(T11,T21,TE,TR,0,ETL(k))))/sqrt(ETL(k))/sqrt(TR);
	S2(k) = sum(abs(fsesignal(T12,T22,TE,TR,0,ETL(k))))/sqrt(ETL(k))/sqrt(TR);
end;
C=S2-S1;

plot(ETL,S1,'b-',ETL,S2,'r--',ETL,C,'g-.');
grid on;
xlabel('Echo-Train Length');
ylabel('SNR efficiency');
title('SNR efficiency vs ETL');
legend('Tissue A','Tissue B','Contrast');


