function satisfy = r8mat_xtax ( A, test )

%*****************************************************************************80
%
%% r8mat_xtax() checks x'Ax for positivity.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    25 September 2022
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real A(M,N), the matrix.
%
%    integer test: the number of tests.
%
%  Output:
%
%    real satisfy: the number of times x'Ax was positive.
%
  [ m, n ] = size ( A );

  satisfy = 0;

  for i = 1 : test
    x = randn ( n, 1 );
    xtax = x' * ( A * x );
    if ( 0.0 < xtax )
      satisfy = satisfy + 1;
    end
  end

  return
end
