0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 function describeVariables( varParams, bestIdx )
0013
0014
0015
0016 numAOIs = varParams.dimPerFeat(1);
0017
0018
0019
0020 clear x whereItIs
0021 numBest = length( bestIdx );
0022 numVariableTypes = length( varParams.dimPerFeat);
0023
0024 for i1 = 1:numVariableTypes
0025 x(i1) = sum(varParams.dimPerFeat(1:i1));
0026 end
0027
0028 whereItIs = zeros( numBest,1);
0029 for i1 = 1:numBest
0030 temp = find( bestIdx(i1) <= x );
0031 whereItIs(i1) = temp(1);
0032 end
0033
0034 for i1 = 1:numBest
0035
0036 if whereItIs(i1) > 1
0037 subWhereItIs(i1) = bestIdx(i1) - x( whereItIs(i1) -1);
0038 else
0039 subWhereItIs(i1) = bestIdx(i1);
0040 end
0041
0042
0043 if strcmp( varParams.dimNames{whereItIs(i1)}, 'AOIFixationSeq' )
0044 whichPos = mod( subWhereItIs(i1), numAOIs);
0045 if whichPos == 0; whichPos =numAOIs; end
0046 whichFix = ceil( subWhereItIs(i1)/numAOIs );
0047 fprintf( 'Var %d is Fix %d at AOI %d \n', i1, whichFix, whichPos);
0048
0049 elseif strcmp( varParams.dimNames{whereItIs(i1)}, 'AOISaccadeSeq' )
0050 whichPos = mod( subWhereItIs(i1), numAOIs);
0051 if whichPos == 0; whichPos =numAOIs; end
0052 whichFix = ceil( subWhereItIs(i1)/numAOIs );
0053 fprintf( 'Var %d is Sac %d to AOI %d \n', i1, whichFix, whichPos);
0054
0055
0056
0057
0058
0059
0060
0061
0062 elseif strcmp( varParams.dimNames{whereItIs(i1)}, 'relNonRelFixSeq' )
0063 target = 'relevant';
0064 whichPos = mod( subWhereItIs(i1), 2);
0065 if whichPos == 0; target = 'non-relevant'; end
0066 whichFix = ceil( subWhereItIs(i1)/2 );
0067 fprintf( 'Var %d is Fix %d at %s AOI \n', i1, whichFix, target);
0068
0069
0070 elseif strcmp( varParams.dimNames{whereItIs(i1)}, 'relNonRelSacSeq' )
0071 target = 'relevant';
0072 whichPos = mod( subWhereItIs(i1), 2);
0073 if whichPos == 0; target = 'non-relevant'; end
0074 whichFix = ceil( subWhereItIs(i1)/2 );
0075 fprintf( 'Var %d is Sac %d to %s AOI \n', i1, whichFix, target);
0076
0077 else
0078 fprintf( 'Var %d is feat %d of %s\n', i1, subWhereItIs(i1), ...
0079 varParams.dimNames{whereItIs(i1)});
0080 end
0081
0082 end
0083
0084
0085
0086
0087