![]() |
GetLargestComponentsPURPOSE
Gets the components with the largest weigth.
SYNOPSIS
function gmC=GetLargestComponents(gm,m)
DESCRIPTION
Gets the components with the largest weigth. Returns a Gaussian mixture formed by the 'm' elements of the input mixture with larger weigth. CROSS-REFERENCE INFORMATION
This function calls:
SOURCE CODE
0001 function gmC=GetLargestComponents(gm,m) 0002 % Gets the components with the largest weigth. 0003 % 0004 % Returns a Gaussian mixture formed by the 'm' elements of the 0005 % input mixture with larger weigth. 0006 0007 if gm.n<=m 0008 gmC=gm; 0009 else 0010 [w ndx]=sort(gm.w,2,'descend'); 0011 nw=gm.w(ndx(1:m)); 0012 gmC=GMixture(nw/sum(nw),gm.g(ndx(1:m))); 0013 end |