<div dir="ltr">Dear Anita,<div><br></div><div>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.</div><div><br></div>

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

<div> </div><div>  >> [trgs,urnbrs,urnbrtypes,delays,tflds,urnflds] = ...</div><div>                                           eeg_context(EEG,target,nbr,[-4 1],'position');</div><div>     %</div><div>     % Output 'delays' now contains latencies (in ms) from each 'square' target event to the </div>

<div>     % 4th preceding and 1st succeeding 'rt' OR 'square' urevent (else NaN when none such). </div><div>     % Outputs 'tfields' and 'urnflds' give the 'position' field values of target events and </div>

<div>     % neighbor urevents. Output 'urnbrtypes', the index of the type (1='square' or 2='rt') </div><div>     % of the ('urnbrs') neighbor urevents.</div><div>     %</div><div>  >> trts      = find(trgs(:,4)==2);   % targets followed by an 'rt' (before any 'square')</div>

<div>  >> pos3      = find(trgfld = 3);     % targets with 'position'=3 (numeric field value).</div><div>  >> selevents = intersect_bc(trts,pos3); % target events by both criteria</div><div>  >> selepochs = trgs(selevents,3);    % epoch numbers centered on the selected target events</div>

</div><div>%%%%%%%%%%%%%%%%%%%%%%%</div><div><br></div><div>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.</div>

<div><br></div><div>Makoto</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-02-28 11:50 GMT-08:00 Ana Maria Cebolla Alvarez <span dir="ltr"><<a href="mailto:acebolla@ulb.ac.be" target="_blank">acebolla@ulb.ac.be</a>></span>:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear All,<br>
<br>
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…<br>


<br>
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.<br>
<br>
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…<br>
<br>
Help?<br>
<br>
<br>
% For each target 'square' event, find the succeeding '120' , '121', '122'.. events<br>
[targsrt,nextrts,nxtypert,rtlats] = eeg_context(EEG,{'247'},{'120'},1);  % find succeeding 120 events<br>
[targssq,nextsqs,nxtypesq,sqlats] = eeg_context(EEG,{'247'},{'121'},1);  % find succeeding 121 events<br>
<br>
Thank you so much,<br>
Kind regards,<br>
anita<br>
<br>
Ana Maria Cebolla Alvarez (PhD)<br>
Laboratory of Neurophysiology and Movement Biomechanics, FSM<br>
Université Libre de Bruxelles<br>
ULB - Campus ERASME - CP 640<br>
N.5.109 (5th floor)<br>
808, Route de Lennik<br>
1070 ANDERLECHT<br>
Belgium<br>
Ph.+32/2/555.39.88 +32/2/555.33.93 +32/2/555.34.74<br>
<br>
<br>
<br>
_______________________________________________<br>
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu">eeglablist-unsubscribe@sccn.ucsd.edu</a><br>
For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu">eeglablist-request@sccn.ucsd.edu</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Makoto Miyakoshi<br>Swartz Center for Computational Neuroscience<br>Institute for Neural Computation, University of California San Diego<br></div>


</div>