[Eeglablist] using pop_editeventvals to add triggers to epochs

Kaelasha Tyler kaelasha.tyler at gmail.com
Thu Nov 14 01:43:21 PST 2019


Hi all,

I wish to place triggers into each epoch of EEG, post recording.
This code below works sometimes, and other times produces errors.

*If anyone can let me know what I asm doing wrong, and/or suggest cleaner
code, that would be much appreciated.*

I edited this snippet of code from eeg.history, so don't fully understand
what each part of the code is doing. 'help pop_editeventvals' is fairly
sparse too.
So also, if anyone can clearly explain what each component of this code is
doing, that would be great.

The code I am using is:

time=150

for i=1:EEG.trials

 EEG = pop_editeventvals(EEG,'insert',{5 [] [] [] [] [] [] [] [] i},
'changefield',{5 'type' 'Time0'},'changefield',{5 'latency' time});

end

Essentially, I want to place a marker called 'Time0' at 150 in every epoch.

Thanks in advance.

Kaelasha



More information about the eeglablist mailing list