[Eeglablist] add events to the EEG data
James Desjardins
jdesjardins at brocku.ca
Fri Feb 6 06:19:11 PST 2015
Hi Karlo,
Once you load a data set, executing the following script at the command line should add the events that you are looking for...
%Get the latencies (data point indices) for all 'A' type events...
A_latencies=[EEG.event(find(strcmp('A',{EEG.event.type}))).latency];
%for each A_latencies add a new event type '1' with a latency of (A_latencies(i)+1.5*EEG.srate)-1...
for i=1:length(A_latencies);
n_events=length(EEG.event);
EEG.event(n_events+1).type='1';
EEG.event(n_events+1).latency=(A_latencies(i)+1.5*EEG.srate)-1;
EEG.event(n_events+1).urevent=n_events+1;
end
%check for consistency and reorder the events chronologically...
EEG=eeg_checkset(EEG,'eventconsistency');
James
________________________________
From: eeglablist-bounces at sccn.ucsd.edu [eeglablist-bounces at sccn.ucsd.edu] on behalf of karlo gonzales [thats_karlo at yahoo.com]
Sent: February 5, 2015 5:16 PM
To: EEGLAB List
Subject: [Eeglablist] add events to the EEG data
Hi,
We have an EEG data with several events, which marked as 'A' and repeated every 5 sec.
what i am looking for is a way to add extra events to the data such as event '1' and appears 1.5 sec after event 'A'.
i am looking forward to hear from you.
Thanks in advance,
Karlo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20150206/bdf428ff/attachment.html>
More information about the eeglablist
mailing list