function x = normal_samples ( n, mu, sigma )

%*****************************************************************************80
%
%% normal_samples() samples the Normal PDF.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    26 September 2018
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the number of samples.
%
%    real MU, SIGMA, the parameters of the PDF.
%    SIGMA nonzero.
%
%  Output:
%
%    real X(N), samples of the PDF.
%
  r = rand ( n, 2 );

  x(1:n,1) = mu + sigma * sqrt ( -2.0 * log ( r(1:n,1) ) ) ...
    .* cos ( 2.0 * pi * r(1:n,2) );

  return
end
