function r8mat_diag_set_scalar_test ( )

%*****************************************************************************80
%
%% R8MAT_DIAG_SET_SCALAR_TEST tests R8MAT_DIAG_SET_SCALAR.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    05 August 2018
%
%  Author:
%
%    John Burkardt
%
  n = 5;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8MAT_DIAG_SET_SCALAR_TEST\n' );
  fprintf ( 1, '  R8MAT_DIAG_SET_SCALAR sets the diagonal etnries\n' );
  fprintf ( 1, '  of an R8MAT to a given scalar.\n' );

  a = r8mat_indicator ( n, n );
  r8mat_print ( n, n, a, '  Initial matrix A:' );

  s = 123.45;
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Scalar value for diagonal is %g\n', s );

  a2 = r8mat_diag_set_scalar ( n, a, s );
  r8mat_print ( n, n, a2, '  A with new diagonal:' );

  return
end
