Commit 30e50f08 authored by Tyler Collins's avatar Tyler Collins
Browse files

Edge case fix for file processing

parent 43368641
......@@ -95,6 +95,7 @@ for epi=1:EEG.trials;
data(:,EEG.epoch(epi).startpnt-pntgap:EEG.epoch(epi).startpnt-pntgap+(EEG.pnts-1))=EEG.data(:,:,epi);
end
if ~isempty(EEG.event);
%handle events...
if ischar(EEG.epoch(epi).eventtype);
EEG.epoch(epi).eventtype=cellstr(EEG.epoch(epi).eventtype);
......@@ -139,6 +140,7 @@ for epi=1:EEG.trials;
if evtcount>0;
lastevtpnt=EEG.event(evtcount).latency;
end
end
end
data=data(:,1:EEG.epoch(epi).startpnt-pntgap+(EEG.pnts-1));
......@@ -164,4 +166,4 @@ if isfield(EEG,'marks');
EEG=marks_moveflags(EEG,2);
end
EEG=eeg_checkset(EEG);
EEG=eeg_checkset(EEG);
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment