[Eeglablist] Adding events using pop_editeventvals is very slow

Makoto Miyakoshi mmiyakoshi at ucsd.edu
Wed Jan 29 10:20:35 PST 2014


Dear David,

Here is a sample code for you.

%%%%%%%%%%%%%%%%%%%%%%%
%% importing event markers
EEG.event.type = 'boundary';
EEG.event.latency = 1;
EEG.event.urevent = 1;
EEG.urevent.type = 'boundary';
EEG.urevent.latency = 1;

for n=1:size(eventTimeStamp,2)
    EEG = pop_editeventvals(EEG,...
        'insert',     {1 [] [] []},...
        'changefield',{1 'type'    allEventLabels{n}},...
        'changefield',{1 'latency' eventTimeStamp(n)});
end
eeglab redraw
%%%%%%%%%%%%%%%%%%%%%%%%

Makoto


2014-01-28 David Kaufman <david.kaufman at gmx.de>

> Dear list,
>
> I'm trying to add ~300 events to EEG.event. I'm doing this using the
> pop_editintervals function. Every time this function is called the
> eeg_checkset and eeglab_options file is executed which is considerably
> slow. My function call looks like this:
>
> pop_editeventvals(EEG,'append',{0 (latencyduration -1 [] [] 200 [] []});
>
> Is there a way to add events without invoking the additional overhead of
> eeg_checkset?
>
> David
>
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to
> eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to
> eeglablist-request at sccn.ucsd.edu
>



-- 
Makoto Miyakoshi
Swartz Center for Computational Neuroscience
Institute for Neural Computation, University of California San Diego
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20140129/b4b663cf/attachment.html>


More information about the eeglablist mailing list