0001 function [tn,tn_all,fluctres] = fluctanalysis_yp(tn,txJ,txP,tI,tP,racc,itnmin)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 if nargin < 6,
0025 racc = NaN;
0026 end
0027 if nargin < 7,
0028 itnmin = 1;
0029 end
0030
0031 if ~isstruct(racc),
0032 raccval = racc;
0033 racc = struct;
0034 racc.P = raccval;
0035 racc.I = raccval;
0036 end
0037
0038
0039
0040 txP_all = txP;
0041 txP = txP(itnmin:end,:);
0042 if isvector(txP_all),
0043 txP = txP(:).';
0044 end
0045
0046 tn_all = tn;
0047 tn = tn(itnmin:end);
0048
0049 fluctres.P.tP_all = tP;
0050 fluctres.P.tnP_all = tn_all;
0051 fluctres.P.tP = tP(itnmin:end);
0052 [fluctres.P.iPtot,fluctres.P.Ptot,fluctres.P.Ptotm,fluctres.P.Ptots,fluctres.P.Ptotr,fluctres.P.iPtotr] = statanalysis_yp(fluctres.P.tP,racc.P);
0053
0054 fluctres.P.xP = txP(fluctres.P.iPtot,:);
0055 fluctres.P.xPm = mean(fluctres.P.xP,1);
0056 fluctres.P.xPs = std(fluctres.P.xP);
0057
0058 txJ_all = txJ;
0059 txJ = txJ(itnmin:end,:);
0060 if isvector(txJ_all),
0061 txJ = txJ(:).';
0062 end
0063
0064 fluctres.I.tI_all = tI;
0065 fluctres.I.tnI_all = tn_all;
0066 fluctres.I.tI = tI(itnmin:end);
0067 fluctres.I.tnI = tn(fluctres.P.iPtot);
0068 fluctres.I.tI = fluctres.I.tI(fluctres.P.iPtot);
0069 txJ = txJ(fluctres.P.iPtot,:);
0070 [fluctres.I.iItot,fluctres.I.Itot,fluctres.I.Itotm,fluctres.I.Itots,fluctres.I.Itotr,fluctres.I.iItotr] = statanalysis_yp(fluctres.I.tI,racc.I);
0071
0072 fluctres.I.xJ = txJ(fluctres.I.iItot,:);
0073 fluctres.I.xJm = mean(fluctres.I.xJ,1);
0074 fluctres.I.xJs = std(fluctres.I.xJ);