<div dir="ltr"><div class="gmail_default" style="color:rgb(51,51,153)">Hello Anne, hope the below helps a bit. Kindly search past eeglablist discussions on similar topics. Cheers.</div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)"><div class="gmail_default">***See the details and functions listed below. If you know the time and label of each event you want to create, the function eeg_addnewevents might do the trick.</div><div class="gmail_default"><br></div><div class="gmail_default" style="color:rgb(34,34,34)"><div class="gmail_default"><font color="#333399"><a href="http://sccn.ucsd.edu/wiki/Chapter_03:_Event_Processing">http://sccn.ucsd.edu/wiki/Chapter_03:_Event_Processing</a></font><br></div><div class="gmail_default"><br></div><div class="gmail_default"><font color="#333399"><a href="http://sccn.ucsd.edu/pipermail/eeglablist/2015/009265.html">http://sccn.ucsd.edu/pipermail/eeglablist/2015/009265.html</a><br></font></div><div><font color="#333399"><br></font></div><div><font color="#333399">*function names</font></div></div><div class="gmail_default" style="color:rgb(34,34,34)"><font color="#333399">eeg_addnewevents<br></font></div><div class="gmail_default" style="color:rgb(34,34,34)"><font color="#333399">importevent<br></font></div><div class="gmail_default" style="color:rgb(34,34,34)"><font color="#333399">show_events<br></font></div><div class="gmail_default" style="color:rgb(34,34,34)"><font color="#333399">eeg_eventtable<br></font></div><div class="gmail_default" style="color:rgb(34,34,34)"><font color="#333399">eeg_getepochevent</font></div></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)">Depending on whether you have your file already epoched or not, you probably want to use information in the some subfields of EEG.event and, especially for epoched data, EEG.epoch. Or fillup and use info into EEG.epochdescription, etc...<br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)">Try to make a loop in matlab that runs through the "trial info" regarding each trial, which should be easy to find in the EEG structure. The loop should have as many steps as there are current trials.Also, you could have a matrix of information about the trials that the code refers to in order to make a decision about the trial in question. <br></div><div class="gmail_default" style="color:rgb(51,51,153)">Then at each step of the loop determine which condition it is, which marker you want to give it, and then either<br></div><div class="gmail_default" style="color:rgb(51,51,153)">a) insert a marker, </div><div class="gmail_default" style="color:rgb(51,51,153)">or b) make a list of event markers/times and then insert them all at once</div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)">There are much more elegant solutions that avoid loops in Matlab, see the example from the eeglab list at the beginning of this note.</div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)">There are also ways you can complicate the event-marking process by making the creation of events dependent on other things (such as whether preceding or following trials were of a certain type, the speed of responding, etc...)</div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)">You'll also most likely have to make sure you've updated your structure and run eeg_checkset to make sure all is kosher.<br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style="color:rgb(51,51,153)"><br></div><div class="gmail_default" style=""><font color="#333399"><br></font></div><div class="gmail_default" style=""><br></div><div class="gmail_default" style=""><font color="#333399"><br></font></div><div class="gmail_default" style=""><font color="#333399"><br></font></div><div class="gmail_default" style=""><font color="#333399"><br></font></div><div class="gmail_default" style=""><font color="#333399"><br></font></div><div class="gmail_default" style=""><font color="#333399"><br></font></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 23, 2015 at 5:17 AM, Anne Mickan <span dir="ltr"><<a href="mailto:amickan1990@gmail.com" target="_blank">amickan1990@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>I would like to extract and segment a subpart of trials from my continuous EEG data based on the marker names for the trials. My trial names are rather long and an example marker name would be this: S1_con1_sub1_corr_corrresp_Snr_12</div><div><br></div><div>I would like to epoch all trials of condition 1 (con1) that are correct (corr) and ignore all others. I know I can describe the type of markers I want using the following regular expression: S1_con1_sub\d_corr_\w+.+</div><div><br></div><div>I just don't know how to correctly embed this regular expression into the epoch() function in my Matlab script. I've tried a few things already, but nothing worked properly. My question is thus: How do I tell Matlab / EEGlab to go through the list of markers (i.e. trials/epochs) in the current dataset and to only select the ones fitting the above regexp string for epoching? </div><div><br></div><div>Thanks a lot in advance for your help!</div><div><br></div><div>Best,</div><div>Anne</div></div>
<br>_______________________________________________<br>
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" rel="noreferrer" 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></div>