function x = normal_01_samples ( n )

%*****************************************************************************80
%
%% normal_01_samples() samples the standard normal probability distribution.
%
%  Discussion:
%
%    The standard normal probability distribution function (PDF) has
%    mean 0 and standard deviation 1.
%
%    The Box-Muller method is used.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    26 September 2018
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the number of samples.
%
%  Output:
%
%    X(N), samples of the standard normal PDF.
%
  r = rand ( n, 2 );
  x(1:n,1) = sqrt ( -2.0 * log ( r(1:n,1) ) ) .* cos ( 2.0 * pi * r(1:n,2) );

  return
end
