[Eeglablist] eeg_context ?

Makoto Miyakoshi mmiyakoshi at ucsd.edu
Tue Mar 4 19:12:08 PST 2014


Dear Anita,

Unfortunately the output of the function is not ready to use and requires
some more processes, which are described in the end of the help of this
function.

%%%%%%%%%%%%%%%%%%%%%%%
  >> target   = 'square';                % target events are type 'square'
  >> nbr      = {'square','rt'};         % neighbor events are either
'square' or 'rt'

  >> [trgs,urnbrs,urnbrtypes,delays,tflds,urnflds] = ...
                                           eeg_context(EEG,target,nbr,[-4
1],'position');
     %
     % Output 'delays' now contains latencies (in ms) from each 'square'
target event to the
     % 4th preceding and 1st succeeding 'rt' OR 'square' urevent (else NaN
when none such).
     % Outputs 'tfields' and 'urnflds' give the 'position' field values of
target events and
     % neighbor urevents. Output 'urnbrtypes', the index of the type
(1='square' or 2='rt')
     % of the ('urnbrs') neighbor urevents.
     %
  >> trts      = find(trgs(:,4)==2);   % targets followed by an 'rt'
(before any 'square')
  >> pos3      = find(trgfld = 3);     % targets with 'position'=3 (numeric
field value).
  >> selevents = intersect_bc(trts,pos3); % target events by both criteria
  >> selepochs = trgs(selevents,3);    % epoch numbers centered on the
selected target events
%%%%%%%%%%%%%%%%%%%%%%%

You should type 'help find' and 'help intersect' to learn how to use the
two functions. Their help could have sample codes, so copy it and paste to
your empty editor (type 'edit' and it opens up) to study the examples. It
is hard to learn them especially if your background is not engineering, but
we will support you.

Makoto


2014-02-28 11:50 GMT-08:00 Ana Maria Cebolla Alvarez <acebolla at ulb.ac.be>:

> Dear All,
>
> I would like to study all events of a certain type ('247') that precede
> some other types ('120', '121', '122'...) to create epochs with the selected
> '247' type, (duration [-1  3]). I don't think that I need to  specify any
> delays within a given range...
>
> In the tutorial, I read about the eeg_context function. It seems vey
> promising, but as my programming skills are really bad, I didn't have any
> success trying with it.
>
> The thing is that I don't event know how continue the next lines that the
> tutorial proposes, till epoching the data with the selected  events...
>
> Help?
>
>
> % For each target 'square' event, find the succeeding '120' , '121',
> '122'.. events
> [targsrt,nextrts,nxtypert,rtlats] = eeg_context(EEG,{'247'},{'120'},1);  %
> find succeeding 120 events
> [targssq,nextsqs,nxtypesq,sqlats] = eeg_context(EEG,{'247'},{'121'},1);  %
> find succeeding 121 events
>
> Thank you so much,
> Kind regards,
> anita
>
> Ana Maria Cebolla Alvarez (PhD)
> Laboratory of Neurophysiology and Movement Biomechanics, FSM
> Université Libre de Bruxelles
> ULB - Campus ERASME - CP 640
> N.5.109 (5th floor)
> 808, Route de Lennik
> 1070 ANDERLECHT
> Belgium
> Ph.+32/2/555.39.88 +32/2/555.33.93 +32/2/555.34.74
>
>
>
> _______________________________________________
> 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
>



-- 
Makoto Miyakoshi
Swartz Center for Computational Neuroscience
Institute for Neural Computation, University of California San Diego
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20140304/f9f2722c/attachment.html>


More information about the eeglablist mailing list