-
Notifications
You must be signed in to change notification settings - Fork 11
/
intializeOutput.m
95 lines (92 loc) · 4.59 KB
/
intializeOutput.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
function [R] = intializeOutput(nDataFiles,nVars,opts)
nBins = opts.nBins'; % Make column vector
nLags = length(opts.lagVect);
% Determine size of 3rd dimension for statistical tests depending on
% whether we test each lag
if opts.SurrogateMethod > 0
if opts.SurrogateTestEachLag
nSLags = nLags;
else
nSLags = 1;
end
else
nSLags = 1;
end
% INITIALIZE PREPROCESSING QUANTITIES
R.nRawData = zeros(nDataFiles,1);
R.nVars = zeros(nDataFiles,1);
R.varNames = opts.varNames;
R.varSymbols = opts.varSymbols;
R.varUnits = opts.varUnits;
if length(nBins) < nVars
R.nBinVect = ones(nVars,1)*nBins;
else
R.nBinVect = nBins;
end
R.nClassified = NaN(nDataFiles,1);
R.binEdgesLocal = NaN(nVars,max(nBins),nDataFiles);
R.minEdgeLocal = NaN(nVars,nDataFiles);
R.maxEdgeLocal = NaN(nVars,nDataFiles);
R.minSurrEdgeLocal = NaN(nVars,nDataFiles);
R.maxSurrEdgeLocal = NaN(nVars,nDataFiles);
R.LocalVarAvg = NaN(nVars,nDataFiles);
R.LocalVarCnt = NaN(nVars,nDataFiles);
R.binEdgesGlobal = NaN(nVars,max(nBins));
R.minEdgeGlobal = NaN(nVars,1);
R.maxEdgeGlobal = NaN(nVars,1);
R.binSurrEdgesGlobal = NaN(nVars,max(nBins));
R.minSurrEdgeGlobal = NaN(nVars,1);
R.maxSurrEdgeGlobal = NaN(nVars,1);
R.GlobalVarAvg = NaN(nVars,1);
% INITIALIZE OUTPUT QUANTITIES FROM THE ENTROPYFUNCTION
R.lagVect = opts.lagVect;
R.HXt = NaN(nVars,nVars,nLags,nDataFiles);
R.HYw = NaN(nVars,nVars,nLags,nDataFiles);
R.HYf = NaN(nVars,nVars,nLags,nDataFiles);
R.HXtYw = NaN(nVars,nVars,nLags,nDataFiles);
R.HXtYf = NaN(nVars,nVars,nLags,nDataFiles);
R.HYwYf = NaN(nVars,nVars,nLags,nDataFiles);
R.HXtYwYf = NaN(nVars,nVars,nLags,nDataFiles);
R.SigThreshT = NaN(nVars,nVars,nSLags,nDataFiles);
R.SigThreshI = NaN(nVars,nVars,nSLags,nDataFiles);
R.meanShuffT = NaN(nVars,nVars,nSLags,nDataFiles);
R.sigmaShuffT = NaN(nVars,nVars,nSLags,nDataFiles);
R.meanShuffI = NaN(nVars,nVars,nSLags,nDataFiles);
R.sigmaShuffI = NaN(nVars,nVars,nSLags,nDataFiles);
R.nCounts = NaN(nVars,nVars,nLags,nDataFiles);
R.I = NaN(nVars,nVars,nLags,nDataFiles);
R.T = NaN(nVars,nVars,nLags,nDataFiles);
R.IR = NaN(nVars,nVars,nLags,nDataFiles);
R.TR = NaN(nVars,nVars,nLags,nDataFiles);
R.SigThreshTR = NaN(nVars,nVars,nSLags,nDataFiles);
R.SigThreshIR = NaN(nVars,nVars,nSLags,nDataFiles);
R.meanShuffTR = NaN(nVars,nVars,nSLags,nDataFiles);
R.sigmaShuffTR = NaN(nVars,nVars,nSLags,nDataFiles);
R.meanShuffIR = NaN(nVars,nVars,nSLags,nDataFiles);
R.sigmaShuffIR = NaN(nVars,nVars,nSLags,nDataFiles);
R.Tplus = NaN(nVars,nLags,nDataFiles);
R.Tminus = NaN(nVars,nLags,nDataFiles);
R.Tnet = NaN(nVars,nLags,nDataFiles);
R.TnetBinary = NaN(nVars,nVars,nLags,nDataFiles);
R.InormByDist = NaN(nVars,nVars,nLags,nDataFiles);
R.TnormByDist = NaN(nVars,nVars,nLags,nDataFiles);
R.SigThreshInormByDist = NaN(nVars,nVars,nSLags,nDataFiles);
R.SigThreshTnormByDist = NaN(nVars,nVars,nSLags,nDataFiles);
R.Ic = NaN(nVars,nVars,nLags,nDataFiles);
R.Tc = NaN(nVars,nVars,nLags,nDataFiles);
R.TvsIzero = NaN(nVars,nVars,nLags,nDataFiles);
R.SigThreshTvsIzero = NaN(nVars,nVars,nSLags,nDataFiles);
R.IvsIzero = NaN(nVars,nVars,nLags,nDataFiles);
R.SigThreshIvsIzero = NaN(nVars,nVars,nSLags,nDataFiles);
R.Abinary = NaN(nVars,nVars,nLags,nDataFiles);
R.Awtd = NaN(nVars,nVars,nLags,nDataFiles);
R.AwtdCut = NaN(nVars,nVars,nLags,nDataFiles);
R.charLagFirstPeak = NaN(nVars,nVars,nDataFiles);
R.TcharLagFirstPeak = NaN(nVars,nVars,nDataFiles);
R.charLagMaxPeak = NaN(nVars,nVars,nDataFiles);
R.TcharLagMaxPeak = NaN(nVars,nVars,nDataFiles);
R.TvsIzerocharLagMaxPeak = NaN(nVars,nVars,nDataFiles);
R.nSigLags = NaN(nVars,nVars,nDataFiles);
R.FirstSigLag = NaN(nVars,nVars,nDataFiles);
R.LastSigLag = NaN(nVars,nVars,nDataFiles);
R.HXtNormByDist = NaN(nVars,nVars,nLags,nDataFiles);