Hello all, and Steve Politzer-Ahles,<br><br>Thank you for your advice on how to resolve my trouble with using the 'eventindices' flag in pop_epoch.<br><br>I eventually simplified my use of pop_epoch, and chose to use: <br>
<br>epochLimits = [-1, 11.2];<br>EEG = pop_epoch(EEG, {'2AA', '2AN', '2NA', '2NN'}, epochLimits);<br><br>This required that I used a separate piece of code to accurately modify the EEG.event.type fields, so that by choosing {'2AA', '2AN', '2NA', '2NN'} in pop_epoch, I thereby pulled just the trials that I wanted.<br>
<br>Thank you,<br><br>James<br><br><div class="gmail_quote">On Sat, Apr 28, 2012 at 3:31 PM, Stephen Politzer-Ahles <span dir="ltr"><<a href="mailto:politzerahless@gmail.com" target="_blank">politzerahless@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi James,<br><br>Have you tried instead using pop_select()? i.e.,<br><br><div style="margin-left:40px">EEG = pop_select( EEG, 'trial', epochsArray);<br>
</div><br>This is what I have used in the past to do something similar to what you are trying to do.<br>
<br>Best,<br>Steve<br><br><div class="gmail_quote"><div><div class="h5">On Thu, Apr 26, 2012 at 4:30 PM, James Jones-Rounds <span dir="ltr"><<a href="mailto:jj324@cornell.edu" target="_blank">jj324@cornell.edu</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Hello EEGLAB users and experts,<br><br>I am having trouble using the 'eventindices' flag for the function pop_epoch, in a script I'm writing to set up some analyses for EMG data analysis.<br><br>The documentation indicates that the use of this optional flag should proceed: <br clear="all">


'eventindices'- [int indices] Extract data epochs time locked to the indexed event numbers. <br><br>1) What does the "int" component mean? I assumed I should just provide a vector of integers corresponding to the event indices I want extracted, but I get this error when I try that: "pop_epoch(): wrong syntax in function arguments"<br>


<br>I included a list of indexed event numbers (in this case every 6th event starting with the 2nd event), which I generated with this line: <br>epochlimits = [-1, 11.2]; <br>epochsArray = (2:6:236);<br>...<br>EEG = pop_epoch(EEG, 'eventindices', epochsArray, epochlimits);<br>


<br>Can anyone advise on how to use this flag?<br><br>2) Alternatively, I would like to know how to extract epochs using information from the "urevent" field, if anyone has had success attempting that.<br><br>Thank you very much!<span><font color="#888888"><br>


<br>James Jones-Rounds<br><br>-- <br>Lab Manager<br>Human Development EEG & Psychophysiology (HEP) Laboratory,<br>Department of Human Development,<br>--------------------------------------------<br>Technician and Lab Safety Officer<br>


Computational Physiology Laboratory,<br>Department of Neurobiology & Behavior,<br>--------------------------------------------<br>Cornell University | Ithaca, NY<br><br>
</font></span><br></div></div>_______________________________________________<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" target="_blank">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" target="_blank">eeglablist-request@sccn.ucsd.edu</a><span class="HOEnZb"><font color="#888888"><br>
</font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br>Stephen Politzer-Ahles<br>
University of Kansas<br>Linguistics Department<br><a href="http://www.linguistics.ku.edu/" target="_blank">http://www.linguistics.ku.edu/</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br>Lab Manager<br>Human Development EEG & Psychophysiology (HEP) Laboratory,<br>Department of Human Development,<br>--------------------------------------------<br>
Technician and Lab Safety Officer<br>Computational Physiology Laboratory,<br>Department of Neurobiology & Behavior,<br>--------------------------------------------<br>Cornell University | Ithaca, NY<br><br>