function y=ppe(x, a, m, cm) % evaluate the normalazation factor of the densities [dimx,lenx] = size(x); N = length(a); y = zeros(1, lenx); for k = 1:N y = y + a(k)*gau(x, m(:,k), cm(:, (k-1)*dimx+1 : k*dimx)); end