function [loglik] = evalmix(X,param);

[n,m] = size(X);
k = length(param);

logp = zeros(n,k);
for i=1:k,
 logp(:,i) = evalgauss(X,param(i));
end;

logpmax = max(logp,[],2);

loglik = logpmax + log(sum(exp(logp-logpmax*ones(1,k)),2));

