0001 function gmOut=GetRandomComponents(gm,m)
0002 % Selects components at random.
0003 %
0004 % Returns a Gaussian mixture formed by 'm' elements of the
0005 % input mixture selected at random.
0006
0007 rp=randperm(gm.n);
0008 lm=rp(1:m);
0009 nw=gm.w(lm);
0010 gmOut=GMixture(nw/sum(nw),gm.g(lm));
0011