function c = c8mat_uniform_01 ( m, n )

%*****************************************************************************80
%
%% c8mat_uniform_01() returns a unit pseudorandom C8MAT.
%
%  Discussion:
%
%    The angles should be uniformly distributed between 0 and 2 * PI,
%    the square roots of the radius uniformly distributed between 0 and 1.
%
%    This results in a uniform distribution of values in the unit circle.
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    28 November 2021
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer M, N, the number of rows and columns in the matrix.
%
%  Output:
%
%    complex C(M,N), the pseudorandom complex matrix.
%
  c = zeros ( m, n );

  for i2 = 1 : n
    for i1 = 1 : m

      r = sqrt ( rand ( 1, 1 ) );
      theta = 2.0 * pi * rand ( 1, 1 );

      c(i1,i2) = r * ( cos ( theta ) + i * sin ( theta ) );

    end

  end

  return
end
