comparison toolboxes/FullBNT-1.0.7/KPMstats/condgauss_sample.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e9a9cd732c1e
1 function x = mixgauss_sample(mu, Sigma, labels)
2 % MIXGAUSS_SAMPLE Sample from a mixture of Gaussians given known mixture labels
3 % function x = mixgauss_sample(mu, Sigma, labels)
4
5 T = length(labels);
6 [D Q] = size(mu);
7 x = zeros(D,T);
8 for q=1:Q
9 ndx = find(labels==q);
10 x(:,ndx) = gaussian_sample(mu(:,q)', Sigma(:,:,q), length(ndx))';
11 end