<div dir="ltr"><div class="gmail_default" style="color:#333399">Hello Marina, some notes below. all the best.</div><div class="gmail_default" style="color:#333399"><br></div><div class="gmail_default" style="color:#333399">1. You should be able to do this at least once via the gui, by creating a new event field, and then entering the accuracy info for that event. Then review the ouput of eegh after that has been run, and build that into your loop.</div><div class="gmail_default" style="color:#333399"><br></div><div class="gmail_default" style="color:#333399">2. Adding of sub-information into events isn't handled great in eeglab, so you may run into some limitations as to how it deals with that info, how it updates it, and whether it accepts all the extra event info you want to add. You may require additional matlab expertise to build your own event structures. I remember doing something similar to you in the past, and I had considerable trouble with updating and re-updating the event sub-field information. This may be a good opportunity for recommending an update to eeglab on eeglab bugzilla. </div><div class="gmail_default" style="color:#333399"><br></div><div class="gmail_default" style="color:#333399">3. For you loop, in general: Get a variable that is the current stimulus number in the event list in eeglab. Get a second variable that is the current stimulis number in your information array. If they match, then feed the accuracy info into the sub-field of that event.</div><div class="gmail_default" style="color:#333399"><br></div><div class="gmail_default" style="color:#333399">4. You may benefit from reviewing past eeglablist posts on similar topics, and also reviewing the function eeg_addnewevents.</div><div class="gmail_default" style="color:#333399"><br></div><div class="gmail_default" style="color:#333399">5. One alternative is to simply make epoched files that contain epochs/events with a particular level of accuracy, and other epoched files at different levels of accuracy. This would be an alternative to marking every event with accuracy.</div><div class="gmail_default" style="color:#333399"><br></div><div class="gmail_default" style="color:#333399">6. Once you do get the accuracy events in, you should be able to sort epochs in erpimage based on accuracy.</div><div class="gmail_default" style="color:#333399"><br></div><div class="gmail_default" style="color:#333399"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 6, 2017 at 9:25 AM, <span dir="ltr"><<a href="mailto:marina.wunderlin@students.unibe.ch" target="_blank">marina.wunderlin@students.<wbr>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_-3515999364203551794m_3511612579229295364body_question_328203" class="m_-3515999364203551794m_3511612579229295364panel m_-3515999364203551794m_3511612579229295364panel-default m_-3515999364203551794m_3511612579229295364add_text_wrapping">
<div class="m_-3515999364203551794m_3511612579229295364panel-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/ee<wbr>glabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank">eeglablist-unsubscribe@sccn.uc<wbr>sd.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.e<wbr>du</a><br></blockquote></div><br></div></div>