[Eeglablist] Adding events without resorting

Makoto Miyakoshi mmiyakoshi at ucsd.edu
Sat Jul 18 16:28:31 PDT 2020


Dear John,

Yes I used to experience the same issue. That is why I stopped using that
EEGLAB function, and modify the EEG.event structure directly.

0. Adding all the event info to end+1 index of your EEG.event structure
using for...end loop.

1. Obtain event latency using the following code (not exactly; please edit
as necessary)
https://sccn.ucsd.edu/wiki/Makoto's_useful_EEGLAB_code#How_to_change_event_type_names


2. [~, sortingIdx] = sort(eventTime, 'ascend');

3. EEG.event = EEG.event(sortingIdx);

Makoto

On Sat, Jul 18, 2020 at 10:48 AM Johnson, John T. <john.johnson at gatech.edu>
wrote:

> I add a lot of events (~1000) to my EEG files using pop_editeventvals(),
> and resorting after each addition takes a long time. Is there a way to add
> events without resorting each time?
>
> I see the variable 'noeventcheck' used internally in pop_editeventvals()
> but it isn't one of the values parsed from varargin.
>
> Thanks,
> John
> _______________________________________________
> 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
>



More information about the eeglablist mailing list