aussDgm.localCPDs{1}.Sigma, mixGauss.cpd.Sigma));
assert(approxeq(mixGaussDgm.CPDs{1}.T(:), mixGauss.mixWeight(:)));
</pre><p class="footer"><br>
      Published with MATLAB&reg; 7.12<br></p></div><!--
##### SOURCE BEGIN #####
%% Fit a mixture of Gaussians comparing mixModelFit and dgmTrain
%
%%

% This file is from pmtk3.googlecode.com

setSeed(0);
nstates = 3; 
d       = 10; 
nobs    = 100; 
%% initialize both models the same
mu0     = randn(d, nstates); 
Sigma0  = zeros(d, d, nstates);
for i=1:nstates
  