diff --git a/bids_export.m b/bids_export.m index 97f0ad9..2e1bfa5 100644 --- a/bids_export.m +++ b/bids_export.m @@ -364,6 +364,9 @@ function bids_export(files, varargin) files(iSubj).notes = cell(1,length(files(iSubj).file)); files(iSubj).notes(:) = { tmpNote }; end + if length(files(iSubj).notes) < length(files(iSubj).file) + files(iSubj).notes{length(files(iSubj).file)} = []; + end end % check that no two files have the same session/run and task