<div dir="ltr">Dear Lucia,<div><br></div><div><span style="color:rgb(0,0,0);font-family:Tahoma;font-size:13.3333330154419px">> (I ask because the code you've written seems to be extracting the event markers (ALLEEG.event.type) from all entries into a study, and I'm not sure how that helps?)</span><br><div class="gmail_extra"><br></div><div class="gmail_extra">Oh sorry you are right. It should be sum instead of find.</div><div class="gmail_extra"><br></div>numTrialList = zeros(length(ALLEEG),3)) % if there are 3 conditions<br>for n = 1:length(ALLEEG)<br>tmpEEG = ALLEEG(1,n);<br>allEventTypes = {tmpEEG.event.type}';<br>numTrialList(n,1) = sum(strcmp(allEventTypes, 'event1')));<br>numTrialList(n,2) = sum(strcmp(allEventTypes, 'event2')));<br>numTrialList(n,3) = sum(strcmp(allEventTypes, 'event3')));<br>end<br>min(numTrialList(:))</div><div><br></div><div><span style="color:rgb(0,0,0);font-family:Tahoma;font-size:13.3333330154419px">> From your reply, it sounds like I need to know how many trials I have per condition per subject (e.g. subject1 has 25 trials for condition1, subject2 has 20 trials for condition1 etc.).</span></div><div><span style="color:rgb(0,0,0);font-family:Tahoma;font-size:13.3333330154419px"><br></span></div><div><span style="color:rgb(0,0,0);font-family:Tahoma;font-size:13.3333330154419px">Unless you are absolutely sure that any single condition from any subjects has at least X trials and you'll use less than X number of lines for erpimage.</span></div><div><span style="color:rgb(0,0,0);font-family:Tahoma;font-size:13.3333330154419px"><br></span></div><div><font color="#000000" face="Tahoma">This is simply because if you have 20 trials you can't visualize the erpimage with > 20 lines. Subsampling is fine, but you can't upsample it.</font></div><div><font color="#000000" face="Tahoma"><br></font></div><div><span style="color:rgb(0,0,0);font-family:Tahoma;font-size:13.3333330154419px">> Does this mean that there is a minimum number of trials required for doing ERP analysis in eeglab? What is the minimum number?</span></div><div><span style="color:rgb(0,0,0);font-family:Tahoma;font-size:13.3333330154419px"><br></span></div><div><span style="color:rgb(0,0,0);font-family:Tahoma;font-size:13.3333330154419px">It's a separate question and as far as I know if you have a single trial you can't perform 'erp analysis' i.e. can't compute average etc with EEGLAB.</span></div><div><span style="color:rgb(0,0,0);font-family:Tahoma;font-size:13.3333330154419px"><br></span></div><div><span style="color:rgb(0,0,0);font-family:Tahoma;font-size:13.3333330154419px">> One of my subjects only has 5 trials for a condition - does that mean I can't calculate ERPs using for that condition?</span><br></div><div><div class="gmail_extra"><br></div><div class="gmail_extra">Because of this subject this condition, your STUDY ERPimage is limited to use maximum of < 5 lines.</div><div class="gmail_extra"><br></div><div class="gmail_extra">If you have minimum of 50 trials across all subjects all conditions, the max ERPimage line is <50, and I'm not sure if it is 50-3 or 50-4... something around it. It's not 50 or 50-1 for sure, I know one of my colleagues tested it a few years ago.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Makoto</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 18, 2015 at 9:22 AM, Li, Lucia M <span dir="ltr"><<a href="mailto:lucia.li@imperial.ac.uk" target="_blank">lucia.li@imperial.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">




<div>
<div style="direction:ltr;font-family:Tahoma;color:rgb(0,0,0);font-size:10pt">Dear Makoto,
<div><br>
</div>
<div>Thank you for taking the time to answer my questions.</div>
<div><br>
</div>
<div>From your reply, it sounds like I need to know how many trials I have per condition per subject (e.g. subject1 has 25 trials for condition1, subject2 has 20 trials for condition1 etc.). Does this mean that there is a minimum number of trials required for
 doing ERP analysis in eeglab? What is the minimum number? One of my subjects only has 5 trials for a condition - does that mean I can't calculate ERPs using for that condition?</div>
<div><br>
</div>
<div>Have I understood correctly? (I ask because the code you've written seems to be extracting the event markers (ALLEEG.event.type) from all entries into a study, and I'm not sure how that helps?)</div>
<div><br>
</div>
<div>Many thanks again & kind regards,</div>
<div>Lucia</div>
<div>
<div style="font-family:'Times New Roman';color:rgb(0,0,0);font-size:16px">
<hr>
<div style="direction:ltr"><font face="Tahoma" size="2" color="#000000"><b>From:</b> Makoto Miyakoshi [<a href="mailto:mmiyakoshi@ucsd.edu" target="_blank">mmiyakoshi@ucsd.edu</a>]<br>
<b>Sent:</b> Monday, June 15, 2015 6:23 PM<br>
<b>To:</b> Li, Lucia M; Ramón Martinez<br>
<b>Cc:</b> <a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">eeglablist@sccn.ucsd.edu</a><br>
<b>Subject:</b> Re: [Eeglablist] std_erpimage error mesage<br>
</font><br>
</div><div><div class="h5">
<div></div>
<div>
<div dir="ltr">Dear Lucia,
<div><br>
</div>
<div>You need to know (or the application should figure it out) the minimum number of available trials across all conditions and subjects. To code it, it should be something like this:</div>
<div><br>
</div>
<div>numTrialList = zeros(length(ALLEEG),3)) % if there are 3 conditions</div>
<div>for n = 1:length(ALLEEG)</div>
<div>tmpEEG = ALLEEG(1,n);</div>
<div>allEventTypes = {tmpEEG.event.type}';</div>
<div>numTrialList(n,1) = find(strcmp(allEventTypes, 'event1')));</div>
<div>
<div>numTrialList(n,2) = find(strcmp(allEventTypes, 'event2')));</div>
</div>
<div>
<div>numTrialList(n,3) = find(strcmp(allEventTypes, 'event3')));</div>
</div>
<div>end</div>
<div>min(numTrialList(:))</div>
<div><br>
</div>
<div>I wrote it without opening Matlab so there may be mistake.</div>
<div><br>
</div>
<div>I believe this should be really implemented in EEGLAB so that the application suggests the upper bound. Ramon, would you please add it to Bugzilla?</div>
<div><br>
</div>
<div>Makoto</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Jun 8, 2015 at 8:40 AM, Li, Lucia M <span dir="ltr">
<<a href="mailto:lucia.li@imperial.ac.uk" target="_blank">lucia.li@imperial.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-family:Tahoma;color:rgb(0,0,0);font-size:10pt">Dear eeglab users & experts,
<div><br>
</div>
<div>I was wondering if someone might be able to help me decipher this error message.</div>
<div><br>
</div>
<div>I have datasets from 12 people which I wish to combine into a study. There are 15 different bin types.</div>
<div><br>
</div>
<div>Having created my study by loading all the datasets in, I tried to "precompute channel measures". I attempted to pre-compute: ERP, Power spectrum, ERP-image, ERSP & ITCs. I clicked 'Test' as well to make sure that the parameters I entered produced sensible
 results. All other options I left as default ('Spherical interpolation' ticked, 'Remove ICA artifactual components pre-tagged' and 'Remove artifactual ICA cluster' unticked). </div>
<div><br>
</div>
<div>Unfortunately, the pre-compute throws up this error message:</div>
<div><br>
</div>
<div>"The default number of ERPimage lines is too large for one of the dataset, {Error occurred in function std_erpimage() at line 169'</div>
<div><br>
</div>
<div>I'm not entirely sure what the problem is. I have also tried to pre-compute with fewer bin types and it's worked perfectly.</div>
<div><br>
</div>
<div>My two thoughts about why the full study won't precompute properly:</div>
<div><span style="font-size:10pt">- some of the bins overlap e.g. a bin for responses from the first half of the task, and a bin for left hand responses from the first half of the task</span></div>
<div><span style="font-size:10pt">- some bins have <10 trials</span></div>
<div><span style="font-size:10pt"><br>
</span></div>
<div><span style="font-size:10pt">Any thoughts and help on this matter greatly appreciated!</span></div>
<div><span style="font-size:10pt"><br>
</span></div>
<div><span style="font-size:10pt">Kind regards,</span></div>
<div><span style="font-size:10pt">Lucia</span></div>
<div><span style="font-size:10pt"><br>
</span></div>
<div><span style="font-size:10pt">---</span></div>
<div><span style="font-size:10pt">L M Li</span></div>
<div><span style="font-size:10pt">Wellcome Trust Clinical Fellow</span></div>
<div>Imperial College London</div>
</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" 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><br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div>
<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>
</div>
</div></div></div>
</div>
</div>
</div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="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></div></div>