0001 function [ADC_STA_cmpts,ADC_STA_allcmpts] = STA(experiment,DIFF_cmpts,...
0002 VOL_cmpts,SAu_cmpts,IC_cmpts)
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 sdeltavec = experiment.sdeltavec;
0026 bdeltavec = experiment.bdeltavec;
0027 seqvec = experiment.seqvec;
0028 npervec = experiment.npervec;
0029 nexperi = length(sdeltavec);
0030 Ncmpt = length(DIFF_cmpts);
0031
0032 VOL_allcmpts = 0;
0033
0034 for icmpt = 1:Ncmpt
0035 VOL_allcmpts = VOL_allcmpts + VOL_cmpts(icmpt);
0036 end
0037
0038 for icmpt = 1:Ncmpt
0039 VF_cmpts(icmpt) = VOL_cmpts(icmpt)/VOL_allcmpts;
0040 end
0041
0042 ADC_STA_cmpts = zeros(Ncmpt,nexperi);
0043
0044 for iexperi = 1:nexperi
0045 for icmpt = 1:Ncmpt
0046 [ADC_STA_cmpts(icmpt,iexperi)] = deff_sta(DIFF_cmpts(icmpt),...
0047 VOL_cmpts(icmpt),SAu_cmpts(icmpt),sdeltavec(iexperi),bdeltavec(iexperi),...
0048 seqvec(iexperi),npervec(iexperi));
0049 end
0050 end
0051 ADC_STA_allcmpts = nan*ones(nexperi,1);
0052 for iexperi = 1:nexperi
0053 ADC_STA_allcmpts(iexperi,1) = sum((IC_cmpts.*VF_cmpts)'.*ADC_STA_cmpts(:,iexperi))./sum((IC_cmpts.*VF_cmpts)');
0054 end