Skip to content

Commit ced1caa

Browse files
authored
Merge pull request #33 from Remi-Gau/master
fixing some userInput inputs checks
2 parents e1667ba + c25123f commit ced1caa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

userInputs.m

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
% group
99
% - the second value set to false will skip asking for the session
1010

11-
if nargin<1
11+
if nargin<1 || isempty(cfg.debug)
1212
cfg.debug = false;
1313
end
1414
if nargin<2
1515
expParameters = [];
1616
end
17-
if nargin<3
17+
if nargin<3 || isempty(askGrpSess)
1818
askGrpSess = [true true];
1919
end
2020

@@ -39,7 +39,7 @@
3939
subjectNb = checkInput(subjectNb);
4040

4141
% the session number
42-
if askGrpSess(2)
42+
if numel(askGrpSess)>1 && askGrpSess(2)
4343
sessionNb = str2double(input('Enter the session (i.e day - 1-999)) number: ', 's'));
4444
sessionNb = checkInput(sessionNb);
4545
end

0 commit comments

Comments
 (0)