Skip to content

Commit

Permalink
Update to create_design_single_event to allow variable length designs…
Browse files Browse the repository at this point in the history
… for convenient study simulation
  • Loading branch information
Michael-Sun committed Feb 9, 2024
1 parent ba94e97 commit 5430fa9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion CanlabCore/Model_building_tools/create_design_single_event.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function [X, e] = create_design_single_event(TR, ISI, eventduration, HPlength, dononlin)
function [X, e] = create_design_single_event(TR, ISI, eventduration, HPlength, dononlin, varargin)
% [X, e] = create_design_single_event(TR, ISI, eventduration, HPlength, dononlin)
%
% Create and plot design for single event
Expand All @@ -20,6 +20,15 @@

if ~isempty(HPlength) && ~isinf(HPlength), dohpfilt = 1; else dohpfilt = 0; end

% optional inputs with default values
% -----------------------------------
for i = 1:length(varargin)
if strcmpi(varargin{i}, 'scanLength')
scanLength=varargin{i+1};
end
end


if dononlin
nonlinstr = 'nonlinsaturation';
else
Expand Down

0 comments on commit 5430fa9

Please sign in to comment.