2>initialize both models the same<a name="2"></a></h2><pre class="codeinput">mu0     = randn(d, nstates);
Sigma0  = zeros(d, d, nstates);
<span class="keyword">for</span> i=1:nstates
   Sigma0(:, :, i) = randpd(d) + 2*eye(d);
<span class="keyword">end</span>
mix0 = normalize(rand(1, nstates));
</pre><h2>random data<a name="3"></a></h2><pre class="codeinput">localEv = randn(nobs, d);
</pre><h2>fit using mixModelFit<a name="4"></a></h2><pre class="codeinput">fprintf(<span class="string">'Mix Gauss\n'</span>);