Skip to content

Commit 2359006

Browse files
committed
add check for missing values in cfg and set to false
1 parent 4cd8456 commit 2359006

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

checkCFG.m

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,21 @@
2222
'acq' % For BIDS file naming: acquisition of fMRI images
2323
};
2424

25+
fields2CheckFalse = { ...
26+
'eyeTracker'
27+
}
28+
2529
for iField = 1:numel(fields2Check)
2630
if ~isfield(expParameters, fields2Check{iField})
2731
expParameters = setfield(expParameters, fields2Check{iField}, []); %#ok<SFLD>
2832
end
2933
end
3034

35+
for iField = 1:numel(fields2CheckFalse)
36+
if ~isfield(cfg, fields2CheckFalse{iField})
37+
cfg = setfield(cfg, fields2CheckFalse{iField}, false); %#ok<SFLD>
38+
end
39+
end
3140

32-
end
41+
42+
end

0 commit comments

Comments
 (0)