<div dir="ltr">Dear Marina,<div><br></div><div>Sorry for belated response.</div><div>You may find this page useful in doing it by coding.</div><div><a href="https://sccn.ucsd.edu/wiki/Makoto's_useful_EEGLAB_code#Event_types">https://sccn.ucsd.edu/wiki/Makoto's_useful_EEGLAB_code#Event_types</a><br></div><div><br></div><div>Makoto</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 6, 2017 at 6:25 AM,  <span dir="ltr"><<a href="mailto:marina.wunderlin@students.unibe.ch" target="_blank">marina.wunderlin@students.unibe.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">
<div id="m_-3301825526394794876body_question_328203" class="m_-3301825526394794876panel m_-3301825526394794876panel-default m_-3301825526394794876add_text_wrapping">
<div class="m_-3301825526394794876panel-body">How can I add events to epoched EEG data via matching variables?<br>
<br>
<p>My EEG Variable has the following structure for events:<br>
</p>
<br>
EEG.event: 1X157 struct (157 epochs of a EEG recording)
<p>    - EEG.event.type              --> specific number for each type of stimulus<br>
</p>
<p>    - EEG.event.accuracy        --> empty<br>
</p>
<p>    - ...</p>
<p>    - ...<br>
</p>
<p><br>
</p>
<p>I already read the event info into matlab. Its an array containing subject ID, Number of Stimulus and Accuracy for each trial --> trialdata 795x3<br>
</p>
<p><br>
</p>
<p>I want to add the accuracy data from this table (trialdata) to EEG.event.accuracy, but it has to be matched for the stimulus number that is in both the array "trialdata" and the variable EEG.event.type.</p>
<p><br>
</p>
<p>I was going for a loop with this basis:</p>
<p><br>
</p>
<p>for i = 1:size(VAR.event)</p>
<p>(VAR.event(i).type)</p>
<p>VAR.event(i).accuracy = trialdata....</p>
<p>end.</p>
<p><br>
</p>
<p>...and this is where i'm stuck. How can I tell the loop that I want the stimulus-matched accuracy read into it?</p>
<p><br>
</p>
<p>I tried it via the user interface first, but the problem seems to be that I don't do the matching via latencies...<br>
</p>
<p><br>
</p>
<p><br>
</p>
</div>
</div>
</div>
</div>

<br>______________________________<wbr>_________________<br>
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" rel="noreferrer" target="_blank">http://sccn.ucsd.edu/eeglab/<wbr>eeglabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu">eeglablist-unsubscribe@sccn.<wbr>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.<wbr>edu</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Makoto Miyakoshi<br>Swartz Center for Computational Neuroscience<br>Institute for Neural Computation, University of California San Diego<br></div></div>
</div>