function y = G(x)
%
% Compute int_{-\infty}^x t p(t) d t
%
% where p(x) is the density of the random variable X
% in the Lloyd-Max Algorithm.
%
lambda = .85;
m = 4;
sigma = .5;
% y = - exp(-x.*x/2)/sqrt(2*pi);
y = lambda*G0(x) + ...
   (1-lambda)*( sigma*G0((x-m)/sigma) + m*normcdf(x,m,sigma) );
