function determ = spd_random_determinant ( n, key )

%*****************************************************************************80
%
%% spd_random_determinant returns the determinant of the SPD_RANDOM matrix.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    25 October 2007
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the order of A.
%
%    integer KEY, a positive value that selects the data.
%
%  Output:
%
%    real DETERM, the determinant.
%
  rng ( key );

  lambda = rand ( n, 1 );

  determ = prod ( lambda(1:n) );

  return
end
