From 8e29d3ee4a81fcedf2a81950eff89d0d53ca6aa8 Mon Sep 17 00:00:00 2001 From: arnodelorme Date: Mon, 25 Oct 2021 11:31:08 -0700 Subject: [PATCH] fix notes issue --- bids_export.m | 3 +++ 1 file changed, 3 insertions(+) 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