-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcfgUseConfigVector.m
36 lines (31 loc) · 1.49 KB
/
cfgUseConfigVector.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
function cfgUseConfigVector(WL, ~)
WL.overide_cfg_defaults();
WL.cfg.SmallScreenScale = 0.6;
WL.cfg.TrialDurationTime = 1;
nTrials = 2;
DummyBlock.Trial.DummyVar = 1:nTrials;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DummyBlock.Trial.RowVector = { (1:3), (1:3) };
DummyBlock.Trial.ColVector = { (1:3)', (1:3)' };
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
WL.TrialData = parse_tree(WL.parse_trials(DummyBlock));
end
% Note this assumes that wl_trial_save:103 reads
% WL.cfg.TrialData_Single.(fn{k}){1} = shiftdim(tmp)';
% i.e. vectors are assigned back to cell. With that:
%
% Due to wl_trial_setup:28-39, row vectors are converted to column vectors.
% Then in wl_trial_save:103, the combination of shiftdim + transpose
% ensures that vectors are row vectors. This seems confusing:
%
% In my config vars, I may associated two dimensions with different things,
% e.g. if I have have N targets then a 3xN matrix could hold the position
% vectors (each naturally a column vector), and a 1xN matrix/rowvector
% could hold the sizes...i.e. to loop over targets, I'd always loop over
% columns.
%
% Currently, this would not be possible because everything 1xN is converted
% to Nx1 when loading the trial data. Later, everything Nx1 is converted to
% 1xN for writing to WL.TrialData (less problematic but still unexpected
% IMO). Is there a good reason for this? I'd prefer just preserving
% dimensions throughout.