From 670e01bb2449d9a5a6e720e49ceb7756c70c009a Mon Sep 17 00:00:00 2001 From: Arnaud Delorme Date: Mon, 18 Oct 2021 14:00:18 -1000 Subject: [PATCH] remove container approach --- bids_export.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bids_export.m b/bids_export.m index 705abde..23f15a9 100644 --- a/bids_export.m +++ b/bids_export.m @@ -1014,6 +1014,7 @@ function copy_data_bids(fileIn, fileOut, notes, opt, chanlocs, copydata, exportE fprintf(fid, 'name\ttype\tunits\n'); acceptedChannelTypes = { 'AUDIO' 'EEG' 'EOG' 'ECG' 'EMG' 'EYEGAZE' 'GSR' 'HEOG' 'MISC' 'PUPIL' 'REF' 'RESP' 'SYSCLOCK' 'TEMP' 'TRIG' 'VEOG' }; channelsCount = []; + channelsCount.EEG = 0; for iChan = 1:EEG.nbchan % Type if ~isfield(EEG.chanlocs, 'type') || isempty(EEG.chanlocs(iChan).type) @@ -1032,7 +1033,6 @@ function copy_data_bids(fileIn, fileOut, notes, opt, chanlocs, copydata, exportE % Count channels by type (for use later in eeg.json) if strcmp(type, 'n/a') - if ~isfield(channelsCount, 'EEG'), channelsCount.('EEG') = 0; end channelsCount.('EEG') = channelsCount.('EEG') + 1; else if ~isfield(channelsCount, type), channelsCount.(type) = 0; end