<div dir="ltr">Dear Iman,<div><br></div><div><span style="font-family:&#39;Calibri Light&#39;,sans-serif">&gt; Does anyone have any SUCCESSFUL experience about changing group/condition for a subject(s) at STUDY level and </span><u style="font-family:&#39;Calibri Light&#39;,sans-serif">after precomputation</u><span style="font-family:&#39;Calibri Light&#39;,sans-serif">.</span><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">No. If I understand correctly, STUDY design does not have such post-hoc flexibility at all. If you change STUDY design, you need to precompute everything again. A small exception may be that when you add subjects you can precompute the additional ones with the same STUDY design but with different STUDY and integrate into the original STUDY later; you can start from preculustering in this case.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Makoto</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 1, 2015 at 3:01 PM, Iman Mohammad-Rezazadeh <span dir="ltr">&lt;<a href="mailto:irezazadeh@ucdavis.edu" target="_blank">irezazadeh@ucdavis.edu</a>&gt;</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 lang="EN-US" link="#0563C1" vlink="#954F72">
<div>
<p class="MsoNormal"><span style="font-family:&#39;Calibri Light&#39;,sans-serif">Hi EEGLABers,<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:&#39;Calibri Light&#39;,sans-serif">Does anyone have any SUCCESSFUL experience about changing group/condition for a subject(s) at STUDY level and
<u>after precomputation</u>. I have been trying to write a script to change STUDY.design data ( see below) and then realized that I have to change STUDY.</span><span style="font-size:10pt;font-family:&#39;Calibri Light&#39;,sans-serif;color:black">datasetinfo . I
 did that but again when I plot the subject data which I changed its grp/condition the old labels showed up in the plot. Then I found I have to change STUDY.changrp as well but it really complicated and hard to track the script.
<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:&#39;Calibri Light&#39;,sans-serif;color:black">Any suggestions?<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:&#39;Calibri Light&#39;,sans-serif;color:black">Best,<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:&#39;Calibri Light&#39;,sans-serif;color:black">Iman</span><span style="font-size:12pt;font-family:&#39;Calibri Light&#39;,sans-serif"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:blue">function</span><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:black"> STUDY=Change_Subject_Var(STUDY,design_no,case_no,var_no,new_var_name)</span><span style="font-size:12pt;font-family:&#39;Courier New&#39;"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:rgb(34,139,34)">%Change_Subject_Var(STUDY,design_no,case_no,var_no,new_var_name)</span><span style="font-size:12pt;font-family:&#39;Courier New&#39;"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:black">no_file=length(STUDY.design(1).cell);</span><span style="font-size:12pt;font-family:&#39;Courier New&#39;"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:blue">for</span><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:black"> i=1:no_file</span><span style="font-size:12pt;font-family:&#39;Courier New&#39;"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:black">    temp_case=STUDY.design(design_no).cell(i).case;</span><span style="font-size:12pt;font-family:&#39;Courier New&#39;"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:black">   
</span><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:blue">if</span><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:black"> strcmp(temp_case,case_no)</span><span style="font-size:12pt;font-family:&#39;Courier New&#39;"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:black">        STUDY.design(design_no).cell(i).value(var_no)=new_var_name;</span><span style="font-size:12pt;font-family:&#39;Courier New&#39;"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:black">   
</span><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:blue">end</span><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:black">
</span><span style="font-size:12pt;font-family:&#39;Courier New&#39;"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:blue">end</span><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:black">
</span><span style="font-size:12pt;font-family:&#39;Courier New&#39;"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:black"> </span><span style="font-size:12pt;font-family:&#39;Courier New&#39;"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:black">no_file=length(STUDY.datasetinfo);</span><span style="font-size:12pt;font-family:&#39;Courier New&#39;"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:blue">for</span><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:black"> i=1:no_file</span><span style="font-size:12pt;font-family:&#39;Courier New&#39;"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:black">    temp_case=STUDY.datasetinfo(i).subject;</span><span style="font-size:12pt;font-family:&#39;Courier New&#39;"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:black">   
</span><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:blue">if</span><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:black"> strcmp(temp_case,case_no)</span><span style="font-size:12pt;font-family:&#39;Courier New&#39;"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:black">        STUDY.datasetinfo(i).group=cell2mat(new_var_name);</span><span style="font-size:12pt;font-family:&#39;Courier New&#39;"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:black">       
</span><span style="font-size:12pt;font-family:&#39;Courier New&#39;"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:black">        </span><span style="font-size:12pt;font-family:&#39;Courier New&#39;"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:black">    </span><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:blue">end</span><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:black">
</span><span style="font-size:12pt;font-family:&#39;Courier New&#39;"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:blue">end</span><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:black">
</span><span style="font-size:12pt;font-family:&#39;Courier New&#39;"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:black"> </span><span style="font-size:12pt;font-family:&#39;Courier New&#39;"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:black"> </span><span style="font-size:12pt;font-family:&#39;Courier New&#39;"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:black"> </span><span style="font-size:12pt;font-family:&#39;Courier New&#39;"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:black"> </span><span style="font-size:12pt;font-family:&#39;Courier New&#39;"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:&#39;Courier New&#39;;color:blue">end</span><span style="font-size:12pt;font-family:&#39;Courier New&#39;"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12pt;font-family:&#39;Courier New&#39;"><u></u> <u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
</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>