Home > SRC > PLOT_SIGNAL.m

PLOT_SIGNAL

PURPOSE ^

plot signal from solving the Bloch-Torrey equation

SYNOPSIS ^

function PLOT_SIGNAL(bvalues,MF_allcmpts,Sig_free,ADC_allcmpts_S0,ADC_allcmpts)

DESCRIPTION ^

 plot signal from solving the Bloch-Torrey equation
 
 Input:
     1. bvalues
     2. MF_allcmpts
     3. Sig_free
     4. ADC_allcmpts_S0
     5. ADC_allcmpts
     
 Output:
     1 figure for the signal

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function PLOT_SIGNAL(bvalues,MF_allcmpts,Sig_free,ADC_allcmpts_S0,ADC_allcmpts)
0002 
0003 % plot signal from solving the Bloch-Torrey equation
0004 %
0005 % Input:
0006 %     1. bvalues
0007 %     2. MF_allcmpts
0008 %     3. Sig_free
0009 %     4. ADC_allcmpts_S0
0010 %     5. ADC_allcmpts
0011 %
0012 % Output:
0013 %     1 figure for the signal
0014 
0015 markervec_cell = cell(6,1);
0016 markervec_cell{1} = 'o';
0017 markervec_cell{2} = 'x';
0018 markervec_cell{3} = '+';
0019 markervec_cell{4} = 'd';
0020 markervec_cell{5} = 's';
0021 markervec_cell{6} = '*';
0022 
0023 nexperi = size(bvalues,1);
0024 
0025 figure;
0026 hold on
0027 iplot = 0;
0028 for iexperi = 1:nexperi   
0029     yvec = real(MF_allcmpts(iexperi,:));
0030     bvec = bvalues(iexperi,:);
0031     h = plot(bvec, log10(yvec),...
0032         ['b',markervec_cell{mod(iexperi-1,6)+1}]);
0033     set(h,'MarkerSize', 10, 'LineWidth',1);
0034     iplot = iplot + 1;
0035     legend_vec{iplot} = [' Experi ',num2str(iexperi)];
0036 end
0037 yvec = Sig_free;
0038 h = plot(bvalues(:), log10(yvec),...
0039     ['r','','-']);
0040 set(h,'MarkerSize', 10, 'LineWidth',1);
0041 iplot = iplot + 1;
0042 legend_vec{iplot} = ['free diffusion'];
0043 for iexperi = 1:nexperi
0044     bvec = bvalues(iexperi,:);
0045     yvec = ADC_allcmpts_S0(iexperi)*exp(-ADC_allcmpts(iexperi)*bvec);
0046     h = plot(bvec, log10(yvec),...
0047         ['b','-']);
0048     set(h,'MarkerSize', 10, 'LineWidth',1);
0049 end
0050 legend(legend_vec{1:iplot});
0051 set(legend, 'FontSize',10)
0052 set(gca, 'FontSize',10)
0053 xlabel('bvalue')
0054 ylabel('log10(Sig)')

Generated on Mon 28-Jan-2019 12:43:57 by m2html © 2005