"keyword">if</span> flgStandardize
   <span class="keyword">for</span> i=1:nChannels, u(i,:)=u(i,:)/std(u(i,:)); <span class="keyword">end</span>
   disp(<span class="string">'Time series were scale-standardized.'</span>);
<span class="keyword">end</span>
</pre><pre class="codeoutput">Time series were detrended.
</pre><h2 id="6">MVAR model estimation</h2><pre class="codeinput">maxIP = 30;         <span class="comment">% maximum model order to consider.</span>
alg = 1;            <span class="comment">% 1: N