n</h1><!--introduction--><!--/introduction--><h2>Contents</h2><div><ul><li><a href="#2">initialize both models the same</a></li><li><a href="#3">random data</a></li><li><a href="#4">fit using mixModelFit</a></li><li><a href="#5">create the initial dgm</a></li><li><a href="#6">fit using dgmTrain</a></li><li><a href="#7">compare results</a></li></ul></div><pre class="codeinput"><span class="comment">% This file is from pmtk3.googlecode.com</span>

setSeed(0);
nstates = 3;
d       = 10;
nobs    = 100;
</pre><h