[Eeglablist] boolean expression/term?

Stefan Debener s.debener at uke.uni-hamburg.de
Wed Sep 27 06:31:21 PDT 2006


Hi Doerte,
the code below should do it. Again, I'd recommend doing this on the 
continuous data before epoching the file. Following re-naming you could 
epoch for '10' as time-locking events only. If you play a bit with the 
code below you'll see that it's fairly easy to implement any boolean 
expression you are interested in. By making use of EEG.event(x).latency, 
you could also easily select trials with (correct/incorrect) responses 
within some reasonable latency interval, etc. If you find it hard to 
understand the EEG.event structure, it might help you reading the 
corresponding sections of the EEGLAB manual about EEG.event and EEG.epoch.
Best,
Stefan
**********************
for i =1:length(EEG.event)-1
    if isequal(EEG.event(i).type, 8) & isequal(EEG.event(i+1).type, 11)
        EEG.event(i).type = 10;
    end
end

**********************
Doerte K. Spring wrote:
> Hi EEGLAB experts,
>
> I was wondering whether eeglab has options for a boolean expression/term
> included. For convenience in data epoching, I'd like to extract epochs for only
> a certain event type which proceds a specified other event. E.g., let's say, I
> have a bunch of events coded with 8, but only a third of them actually occur
> together with another event (event code 11). How could I extract the epoch for
> those 8-11 combination only without epoching all events coded with 8?
> At the moment, I only know about a work around solution, which would include the
> epochs for all of the 8s and then scrolling through all extracted epochs to
> exclude the superfluous ones.
> It would be really great, if eeglab has a possibility to just say I wanne have
> all 8 proceding a 10.
>
> Many thanks in advance,
>
> Doerte
>
>
> _______________________________________________
> eeglablist mailing list eeglablist at sccn.ucsd.edu
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu
>
>
>   






More information about the eeglablist mailing list