MATLAB implementation

The subroutine software/gmix_condx.m is used to generate the conditional distribution. The syntax is
	gparm2 = gmix_condx(gparm,x_idx,y_idx,y)
where gparm is the GM parameter vector for $p({\bf z})$, x_idx are the indexes indicating which elements of ${\bf z}$ constitute ${\bf x}$ (they can be any elements), and similarly for y_idx.

The subroutine software/gmix_cmean.m uses software/gmix_condx.m to compute the conditional mean of ${\bf x}$. The syntax is

	xhat = gmix_cmean(gparm,x_idx,y_idx,y)
where all inputs are identical to software/gmix_condx.m. The one exception is that input y can include any number of samples of ${\bf y}$. The dimensions of y are N-by-P where N is the number of samples and P is the dimension of ${\bf y}$.