<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style>
<!--
@font-face
        {font-family:SimSun}
@font-face
        {font-family:SimSun}
@font-face
        {font-family:Calibri}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif"}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
span.EmailStyle17
        {font-family:"Calibri","sans-serif";
        color:windowtext}
.MsoChpDefault
        {font-family:"Calibri","sans-serif"}
@page WordSection1
        {margin:1.0in 1.0in 1.0in 1.0in}
-->
</style><style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1" lang="EN-US" link="blue" vlink="purple">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi Min Sheng,<br>
<br>
I think that it may be easier to rename your events form the command line so that you can segment your conditions separately.<br>
<br>
e.g.<br>
<br>
If your event labels are 'stim', and you know that the first condition consists of 'stim' events 2-97:<br>
<br>
<font face="Courier New">%make sure that the events are stored in chronological order...<br>
EEG=eeg_checkset(EEG,'eventconsistency');<br>
<br>
%initiate an event counter...<br>
event_count=0;<br>
<br>
%loop through all of the events...<br>
for event_index=1:length(EEG.event)<br>
<br>
    %check that the type is 'stim'...<br>
    if strcmp(EEG.event(event_index).type, 'stim')<br>
        <br>
</font>
<div><font face="Courier New">        %increase the event counter by 1...<br>
        event_count=event_count+1;<br>
        <br>
        %check that the event counter is in your target range....<br>
        if event_count>1 && event_count<98<br>
<br>
            %change the name of your event to include a code for condition 1 (e.g. '_C1')<br>
            EEG.event(event_index).type=[EEG.event(event_index).type,'C1'];<br>
<br>
        end<br>
<br>
        %break out of the loop after it renames the 97th 'stim' event...<br>
        if event_count==97<br>
            break<br>
        end<br>
    end<br>
end</font><br>
         <br>
<div style="font-family:Tahoma; font-size:13px">
<div class="BodyFragment"><font size="2"><span style="font-size:10pt">
<div class="PlainText"><br>
Once this is done you will be able to segment normally to condition 1 by choosing 'stimC1' event types, and condition 2 by choosing 'stim' event types.<br>
<br>
<br>
<br>
James Desjardins, MA<br>
Electrophysiology Technologist<br>
Cognitive and Affective Neuroscience Lab, Psychology Department <br>
Jack and Nora Walker Centre for Lifespan Development Research<br>
Brock University<br>
500 Glenridge Ave.<br>
St. Catharines, ON, Canada L2S 3A1<br>
905-688-5550 x4676<br>
--<br>
"'Cause you never can tell What goes on down below!<br>
"This pool might be bigger Than you or I know!"<br>
<br>
McElligot's Pool<br>
Dr.Seuss 1947</div>
</span></font></div>
</div>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF237658"><font color="#000000" face="Tahoma" size="2"><b>From:</b> eeglablist-bounces@sccn.ucsd.edu [eeglablist-bounces@sccn.ucsd.edu] on behalf of Min Sheng [Min.Sheng@utsouthwestern.edu]<br>
<b>Sent:</b> August-30-13 6:01 PM<br>
<b>To:</b> eeglablist@sccn.ucsd.edu<br>
<b>Subject:</b> [Eeglablist] how to create new data sets based on the number of event<br>
</font><br>
</div>
<div></div>
<div>
<div class="WordSection1">
<p class="MsoNormal">Dear all;</p>
<p class="MsoNormal">I am processing visual ERP data, I have 768 events which under 2 different conditions( room air and hyperoxia). I did not mark these two conditions when record EEG data but I know the time period of each conditons.</p>
<p class="MsoNormal">Such as from event 2 to  event 97 was under room air. So can I extract this period and create a new dataset to do further analysis? I want to compare ERP under these two conditions.</p>
<p class="MsoNormal">Thanks</p>
<p class="MsoNormal">Min Sheng</p>
<p class="MsoNormal"> </p>
</div>
<br>
<hr>
<font color="Blue" face="Arial" size="2"><br>
UT Southwestern Medical Center<br>
The future of medicine, today.<br>
</font></div>
</div>
</div>
</body>
</html>