Hello Mary-Jane,<br><br>There should be several ways to do this with basic MATLAB code. Something similar to this should work:<br><br>for i = 1:length(EEG.event)<br>    if i <= 151<br>        EEG.event(i) = [1 EEG.event(i).type];<br>
    else<br>        EEG.event(i) = [2 EEG.event(i).type];<br>    end;<br>end;<br>        <br>        <br>        <br>        <br><br><div class="gmail_quote">On Fri, Nov 23, 2012 at 7:41 AM, Budd, Mary-Jane S <span dir="ltr"><<a href="mailto:mbudd@essex.ac.uk" target="_blank">mbudd@essex.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear list,<br>
I would like to recode event type for e.g. Events 1-150 by pre-fixing the<br>
type with a 1, then recode events 151-300 by pre-fixing type with 2. Is<br>
there a simple piece of code that will do this for me?<br>
Thank you<br>
<br>
----------------------<br>
Dr Mary-Jane Budd<br>
Senior Research Officer<br>
Department of Psychology<br>
University of Essex<br>
Wivenhoe Park<br>
Colchester CO4 3SQ<br>
UK<br>
<br>
Room 4.726<br>
<br>
<a href="http://www.essex.ac.uk/psychology/department/people/Budd.html" target="_blank">http://www.essex.ac.uk/psychology/department/people/Budd.html</a><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"><br>-- <br>Stephen Politzer-Ahles<br>University of Kansas<br>Linguistics Department<br><a href="http://people.ku.edu/~sjpa/" target="_blank">http://people.ku.edu/~sjpa/</a><br>