Institut de Robòtica i Informàtica Industrial

GetRandomComponents

PURPOSE ^

Selects components at random.

SYNOPSIS ^

function gmOut=GetRandomComponents(gm,m)

DESCRIPTION ^

   Selects components at random.

   Returns a Gaussian mixture formed by 'm' elements of the
   input mixture selected at random.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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


Institut de Robòtica i Informàtica Industrial

Generated on Wed 05-Aug-2009 15:05:21 by m2html © 2003