[Eeglablist] changing event types

Cedric Cannard ccannard at protonmail.com
Sat Jun 24 07:25:40 PDT 2023


Dear Jeff,

Yes, you can do it with something like this (to check):

idx = find(strcmpi({EEG.event.type}, 'S N'));
n = length(idx);
for iEv = 1:n
   EEG.event(idx(iEv)).type = 'N';
end
EEG = eeg_checkset(EEG);

I don't remember if htye need to be cells or strings. If it doesn't work, try this instead:
   EEG.event(idx(iEv)).type = {'N'};

Hope this helps,

Cedric Cannard, PhD


Sent with Proton Mail secure email.

------- Original Message -------
On Thursday, June 22nd, 2023 at 4:37 PM, K Jeffrey Eriksen via eeglablist <eeglablist at sccn.ucsd.edu> wrote:


> Is there a programmatic way to change event types? For instance, I would like to change all events labelled 'S N' to just 'N', where N can be a number from 1-5.
>
> I found pop_editeventvals, but it does look suitable for this task.
>
> -Jeff
> ________________________________
> IMPORTANT NOTICE: This communication, including any attachment, contains important information that may be confidential or privileged, and is intended solely for the entity or individual to whom it is addressed. If you are not the intended recipient, you should contact the sender and delete this message. Any unauthorized disclosure, copying, or distribution of this message is strictly prohibited. Nothing in this email, including any attachment, is intended to be a legally binding signature.
> _______________________________________________
> 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