-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathGenerateExptDesign.m
More file actions
30 lines (29 loc) · 840 Bytes
/
GenerateExptDesign.m
File metadata and controls
30 lines (29 loc) · 840 Bytes
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
function [] = GenerateExptDesign(toml_file)
%Display_Cfg;
addpath(genpath('matlab-toml'));
raw_text = fileread(toml_file);
Cfg = toml.decode(raw_text);
subjectNum = Cfg.session.subjectNum;
subjectDay = Cfg.session.subjectDay;
subjectDayInt = floor(subjectDay); % this will get the actual day, no matter how many repeated times
typeNum = Cfg.session.typeNum;
%%%%%%% LOAD CONFIGURATIONS FROM TOML FILE
KbName('UnifyKeyNames');
addpath(genpath('/opt/psychtoolbox/'))
%% Generate expt sequence
if subjectDayInt == 1
nRuns = 7;
elseif subjectDayInt == 2
nRuns = 9;
elseif subjectDayInt == 3
nRuns = 8;
end
for runNum = 1:nRuns
if runNum == 1
rtfeedback = 0;
else
rtfeedback = 1;
end
[blockData patterns] = RealTimePunisherExptSequence_CLOUD(subjectNum,runNum,rtfeedback,typeNum,subjectDay);
end
end