<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi Tyler,
<div class=""><br class="">
</div>
<div class="">Thanks for the very clear email describing your problem and explored solutions. Agree there’s a mismatch between the documentation and reality. Please file a bug (or go a step further and contribute a solution—see below). </div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">As far as a simpler solution you were very close in your last idea. Instead, try something like this:</div>
<div class=""><br class="">
</div>
<div class="">
<div id="divtagdefaultwrapper" dir="ltr" class="">
<div class="" style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 12pt;">
<span class="" style="color: rgb(0, 111, 201);">EEG = pop_est_selModelOrder( EEG, 'nogui', 'verb', </span><span class="" style="color: rgb(0, 111, 201);">1</span><span class="" style="color: rgb(0, 111, 201);">, ...</span></div>
<div class="" style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 12pt;">
<span class="" style="color: rgb(0, 111, 201);">'modelingApproach', struct( 'winlen', 1), 'prctWinToSample', 100</span><span class="" style="color: rgb(0, 111, 201);">);</span></div>
<div class="" style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 12pt;">
<span class="" style="color: rgb(0, 111, 201);"><br class="">
</span></div>
<div class="">
<div style="font-family: Georgia; font-size: 15px;" class=""><br class="">
</div>
<div style="font-family: Georgia; font-size: 15px;" class="">You can get a sense of the arguments it’s expecting, by looking, as you started to, into the CAT.configs structure, e.g.</div>
<div style="font-family: Georgia; font-size: 15px;" class=""><br class="">
</div>
<div class="">
<div class=""><font size="3" face="Courier" class="">>> hlp_struct2varargin(EEG.CAT.configs.est_selModelOrder) %serializes a structure into a cell array</font></div>
<div class=""><font size="3" face="Courier" class=""><br class="">
</font></div>
<div class=""><font size="3" face="Courier" class="">ans =</font></div>
<div class=""><font size="3" face="Courier" class="">  1×22 cell array</font></div>
<div class=""><br class="">
</div>
<div class=""><font size="3" face="Courier" class="">    'arg_direct'    [0]    <b class="">'modelingApproach'    [1×1 struct]</b>    'morderRange'    [1×2 double]    'downdate'</font></div>
<div class=""><br class="">
</div>
<div class=""><font size="3" face="Courier" class="">    [1]    'runPll'    [1×1 struct]    'icselector'    {1×4 cell}    'winStartIdx'    []    'epochTimeLims'</font></div>
<div class=""><br class="">
</div>
<div class=""><font size="3" face="Courier" class="">    []    'prctWinToSample'    [50]    'plot'    [1×1 struct]    'verb'    [2]</font></div>
</div>
<div class=""><font face="Calibri, Helvetica, sans-serif, EmojiFont, Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols" size="3" class=""><br class="">
</font></div>
<div class="">
<div class="">So you can see that the value for <span style="font-size: medium;" class=""><font face="Courier" class="">modelingApproach</font></span><span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: medium;" class=""> </span>needs
 to be a structure. Its default value is:</div>
</div>
<div class=""><br class="">
</div>
<div class="">
<div class=""><font face="Courier" class="">struct with fields:</font></div>
<div class=""><font face="Courier" class=""><br class="">
</font></div>
<div class=""><font face="Courier" class="">          arg_direct: 0</font></div>
<div class=""><font face="Courier" class="">           algorithm: [1×1 struct]</font></div>
<div class=""><font face="Courier" class="">              morder: 10</font></div>
<div class=""><font face="Courier" class="">         winStartIdx: []</font></div>
<div class=""><font face="Courier" class="">              <b class="">winlen: 0.9</b></font></div>
<div class=""><font face="Courier" class="">             winstep: 0.05</font></div>
<div class=""><font face="Courier" class="">            taperfcn: 'blackmanharris'</font></div>
<div class=""><font face="Courier" class="">       epochTimeLims: []</font></div>
<div class=""><font face="Courier" class="">     prctWinToSample: 100</font></div>
<div class=""><font face="Courier" class="">           normalize: [1×1 struct]</font></div>
<div class=""><font face="Courier" class="">             detrend: [1×1 struct]</font></div>
<div class=""><font face="Courier" class="">               timer: 0</font></div>
<div class=""><font face="Courier" class="">    setArgDirectMode: 1</font></div>
<div class=""><font face="Courier" class="">                verb: 2</font></div>
<div class=""><font face="Courier" class="">       arg_selection: 'Segmentation VAR'</font></div>
</div>
</div>
</div>
</div>
<div class="">
<div class=""><br class="Apple-interchange-newline">
</div>
<br class="">
<div>One other source of clues in working with SIFT or BCILAB is to look at the ‘worker’ function behind each
<font face="Courier" class="">pop_*</font> function, in this case<font face="Courier" class=""> est_selModelOrder.m</font></div>
<div>You can decipher the <font face="Courier" class="">arg_define()</font> statement at the beginning to see which arguments it is possible to specify. </div>
<div><br class="">
</div>
<div>It would be great if you took a shot at fixing it, taking as an example the <font face="Courier" class="">
arg()</font> line defining the <font face="Courier" class="">prctWinToSample</font> parameter, then adding your own line to define e.g. a top-level
<font face="Courier" class="">winlen</font> parameter. You’d then need to verify that it will override the
<font face="Courier" class="">winlen</font> already specified in the <font face="Courier" class="">
modelingApproach</font> structure.</div>
<div><br class="">
</div>
<div>Hope that gets you on the way.</div>
<div><br class="">
</div>
<div>Best,</div>
<div><br class="">
</div>
<div>John</div>
<div><br class="">
</div>
<div>
<div class="">
<div style="orphans: 2; widows: 2;" class="">John R. Iversen, PhD</div>
<div style="orphans: 2; widows: 2;" class="">University of California San Diego</div>
<div style="orphans: 2; widows: 2;" class="">Institute for Neural Computation</div>
<div style="orphans: 2; widows: 2;" class="">Swartz Center for Computational Neuroscience, Assoc. Director</div>
</div>
<div style="orphans: 2; widows: 2;" class="">
<div class="">9500 Gilman Dr #0559</div>
<div class="">La Jolla, CA 92093</div>
<div class=""><a href="mailto:jiversen@ucsd.edu" class="">jiversen@ucsd.edu</a></div>
</div>
</div>
<div class=""><span style="color: rgb(178, 69, 243); font-family: Courier; font-size: 11px;" class=""><br class="">
</span></div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Aug 1, 2018, at 4:21 AM, Tyler Grummett <<a href="mailto:tyler.grummett@flinders.edu.au" class="">tyler.grummett@flinders.edu.au</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div id="divtagdefaultwrapper" dir="ltr" style="caret-color: rgb(0, 0, 0); font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;" class="">
<div style="margin-top: 0px; margin-bottom: 0px;" class="">Dear EEGLABers,</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">Im having difficulties doing something which is probably really simple, and thats specifying certain variables when calling pop_est_selModelOrder programmatically (as I am running it in a super computer).
 I'm trying to specify window length ('winlen') at the very least, but found that I cant specify the window step (winstep) either.</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">If I ran the code:</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<p style="margin-top: 0px; margin-bottom: 0px;" class=""></p>
<div class=""><span style="color: rgb(0, 111, 201);" class="">EEG = pop_est_selModelOrder( EEG, 'nogui', 'verb',<span class="Apple-converted-space"> </span></span><span style="color: rgb(0, 111, 201);" class="">1</span><span style="color: rgb(0, 111, 201);" class="">,
 ...</span></div>
<div class=""><span style="color: rgb(0, 111, 201);" class="">'winlen', 1</span><span style="color: rgb(0, 111, 201);" class="">, 'prctWinToSample', 100</span><span style="color: rgb(0, 111, 201);" class="">);</span></div>
<br class="">
<p style="margin-top: 0px; margin-bottom: 0px;" class=""></p>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">I would get the error:</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<p style="margin-top: 0px; margin-bottom: 0px;" class=""></p>
<div class=""><span style="color: rgb(255, 0, 0);" class="">Error using arg_define (line 406)</span></div>
<div class=""><span style="color: rgb(255, 0, 0);" class="">Some of the specified arguments do not appear in the argument specification;</span></div>
<div class=""><span style="color: rgb(255, 0, 0);" class="">{setname, filename, filepath, subject, group, condition, session, comments,</span></div>
<div class=""><span style="color: rgb(255, 0, 0);" class="">nbchan, trials, pnts, srate, xmin, xmax, times, data, icaact, icawinv, icasphere,</span></div>
<div class=""><span style="color: rgb(255, 0, 0);" class="">icaweights, icachansind, chanlocs, urchanlocs, chaninfo, ref, event, urevent,</span></div>
<div class=""><span style="color: rgb(255, 0, 0);" class="">eventdescription, epoch, epochdescription, reject, stats, specdata, specicaact,</span></div>
<div class=""><span style="color: rgb(255, 0, 0);" class="">splinefile, icasplinefile, dipfit, history, saved, etc, datfile, timeseries, CAT,</span></div>
<div class=""><span style="color: rgb(255, 0, 0);" class="">winlen}.</span></div>
<div class=""><br class="">
</div>
<div class=""><span style="color: rgb(255, 0, 0);" class="">Error in est_selModelOrder (line 100)</span></div>
<div class=""><span style="color: rgb(255, 0, 0);" class="">g = arg_define([0 1],varargin, ...</span></div>
<div class=""><br class="">
</div>
<div class=""><span style="color: rgb(255, 0, 0);" class="">Error in arg_report>arg_report_rich (line 153)</span></div>
<div class=""><span style="color: rgb(255, 0, 0);" class="">    func(args{:});</span></div>
<div class=""><br class="">
</div>
<div class=""><span style="color: rgb(255, 0, 0);" class="">Error in arg_report>do_report (line 125)</span></div>
<div class=""><span style="color: rgb(255, 0, 0);" class="">    feval(['arg_report_' lower(type)],func,args,have_expeval);</span></div>
<div class=""><br class="">
</div>
<div class=""><span style="color: rgb(255, 0, 0);" class="">Error in arg_report (line 93)</span></div>
<div class=""><span style="color: rgb(255, 0, 0);" class="">    res = do_report(type,func,args);</span></div>
<div class=""><br class="">
</div>
<div class=""><span style="color: rgb(255, 0, 0);" class="">Error in pop_est_selModelOrder (line 104)</span></div>
<div class=""><span style="color: rgb(255, 0, 0);" class="">    cfg =</span></div>
<div class=""><span style="color: rgb(255, 0, 0);" class="">    arg_tovals(arg_report('rich',fcnHandle,[{'EEG',ALLEEG(1)},varargin]),false);</span></div>
<br class="">
<p style="margin-top: 0px; margin-bottom: 0px;" class=""></p>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">Eventually I found that if I wrote the following code:</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<p style="margin-top: 0px; margin-bottom: 0px;" class=""></p>
<div class=""><span style="color: rgb(0, 111, 201);" class="">EEG.CAT.configs.est_selModelOrder = arg_tovals( arg_report( 'rich', @est_selModelOrder));</span></div>
<div class="">
<div class=""><span style="color: rgb(0, 111, 201);" class="">EEG.CAT.configs.est_selModelOrder.modelingApproach.winlen = 1;</span></div>
<div class=""><br class="">
</div>
And then ran the code without winlen:</div>
<div class=""><br class="">
</div>
<div class="">
<div style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;" class="">
<span style="color: rgb(0, 111, 201);" class="">EEG = pop_est_selModelOrder( EEG, 'nogui', 'verb', </span><span style="color: rgb(0, 111, 201);" class="">1</span><span style="color: rgb(0, 111, 201);" class="">, ...</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;" class="">
<span style="color: rgb(0, 111, 201);" class="">'prctWinToSample', 100</span><span style="color: rgb(0, 111, 201);" class="">);</span></div>
<br class="">
</div>
then it would run without crashes, however, I feel that I shouldnt have to do that considering it says that it is one of the possible input arguments.
<p style="margin-top: 0px; margin-bottom: 0px;" class=""></p>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">Ive also tried this variation (just to spitball):</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<p style="margin-top: 0px; margin-bottom: 0px;" class=""></p>
<div style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;" class="">
<span style="color: rgb(0, 111, 201);" class="">EEG = pop_est_selModelOrder( EEG, 'nogui', 'verb', </span><span style="color: rgb(0, 111, 201);" class="">1</span><span style="color: rgb(0, 111, 201);" class="">, ...</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;" class="">
<span style="color: rgb(0, 111, 201);" class="">'modelingApproach', { 'winlen', 1}, 'prctWinToSample', 100</span><span style="color: rgb(0, 111, 201);" class="">);</span></div>
<br class="">
<p style="margin-top: 0px; margin-bottom: 0px;" class=""></p>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">but that obviously didnt work.</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">I would appreciate any help on this! Let me know if you need me to write a bug report on this.</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">Kind regards,</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">Tyler</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div id="Signature" class="">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;" class="">
<div name="divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; margin: 0px;" class="">
<div style="font-family: Tahoma; font-size: 13px;" class="">
<div style="font-family: Tahoma; font-size: 13px;" class="">
<div style="font-family: Tahoma; font-size: 13px;" class="">
<div style="font-size: 13px;" class="">*************************
<div style="font-family: Tahoma;" class=""><br class="">
</div>
<div class=""><font face="Arial" class=""><i class="">Tyler Grummett ( BBSc, BSc(Hons I))</i></font></div>
<div class=""><font face="Arial" class=""><i class="">PhD Candidate</i></font></div>
<div class=""><font face="Arial" class=""><i class="">Brain Signals Laboratory</i></font></div>
<div class=""><font face="Arial" class=""><i class="">Multimodal Recording Facility</i></font></div>
<div class=""><font face="Arial" class=""><i class="">Flinders University Tonsley Building</i></font></div>
<div class=""><font face="Arial" class=""><i class="">Rm 4.17</i></font></div>
<div class=""><font face="Arial" class=""><i class="">Ext 19573</i></font></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<span style="caret-color: rgb(0, 0, 0); font-family: Georgia; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Georgia; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Georgia; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Eeglablist
 page:<span class="Apple-converted-space"> </span></span><a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" style="font-family: Georgia; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br style="caret-color: rgb(0, 0, 0); font-family: Georgia; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Georgia; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">To
 unsubscribe, send an empty email to<span class="Apple-converted-space"> </span></span><a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" style="font-family: Georgia; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">eeglablist-unsubscribe@sccn.ucsd.edu</a><br style="caret-color: rgb(0, 0, 0); font-family: Georgia; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Georgia; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">For
 digest mode, send an email with the subject "set digest mime" to<span class="Apple-converted-space"> </span></span><a href="mailto:eeglablist-request@sccn.ucsd.edu" style="font-family: Georgia; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">eeglablist-request@sccn.ucsd.edu</a></div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>