[Eeglablist] Removing event manually

Isil Bilgin bilginlab at gmail.com
Fri Oct 23 13:17:57 PDT 2020


Dear Martin,

Just addition to Dan's suggestion, if you know the index of the epochs you
want to remove from you can also create an array of those event indices
(e.g. events2remove) and feed it to the below EEGLAB function which should
remove the unwanted events without harming the EEGLAB data structure.

EEG = pop_select( EEG,'notrial',events2remove);

Hope it helps,

Kind regards,


----
Isil Bilgin
PhD Researcher,
Biomedical Engineering,
The University of Reading,



On Fri, Oct 23, 2020 at 5:51 PM Martin Simoneau <
Martin.Simoneau at kin.ulaval.ca> wrote:

> Dear EEGlab users,
>
> I want to remove events manually. Here is my MATLAB script. I want to make
> sure that this is not going to mess up my dataset.
>
> listDINs = {EEG.event.type};
> % remove boundary, for example
> for n = 1:length(listDINs)
>     if strcmp(EEG.event(n).type),'boundary')
>         EEG.event(n).type = [];
>         EEG.event(n).description = [];
>         EEG.event(n).begintime = [];
>         EEG.event(n).classid = [];
>         EEG.event(n).code = [];
>         EEG.event(n).duration = [];
>         EEG.event(n).label = [];
>         EEG.event(n).relativebegintime = [];
>         EEG.event(n).sourcedevice = [];
>         EEG.event(n).name = [];
>         EEG.event(n).tracktype = [];
>         EEG.event(n).latency = [];
>         EEG.event(n).mffkeys = [];
>         EEG.event(n).mffkeys_gidx = [];
>         EEG.event(n).mffkeys_cidx = [];
>         EEG.event(n).mffkeysbackup = [];
>     end
> end
>
> I am sure it is necessary to set all fields to []; otherwise, it should be
> confusing for EEGlab to sort things out. However, I want to make sure that
> this script will not cause any damage to my dataset.
>
>
> Thanks for your help,
>
> Martin
>
>
>
> Martin Simoneau, PhD
> Professeur | Professor
> Faculté de médecine - Département de kinésiologie
> 2300, rue de la Terrasse (PEPS)
> Université Laval
> Québec, (Qc) Canada
> G1V 0A6
>
> Chercheur | Researcher
> Centre interdisciplinaire de recherche en réadaptation et intégration
> sociale (CIRRIS)
> 525 boul. Wilfrid-Hamel, Québec (Qc), Canada, G1M 2S8
>
> _______________________________________________
> 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