function r8mat_diag_add_vector_test ( )

%*****************************************************************************80
%
%% R8MAT_DIAG_ADD_VECTOR_TEST tests R8MAT_DIAG_ADD_VECTOR.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    05 August 2018
%
%  Author:
%
%    John Burkardt
%
  n = 5;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8MAT_DIAG_ADD_VECTOR_TEST\n' );
  fprintf ( 1, '  R8MAT_DIAG_ADD_VECTOR adds a vector to the diagonal\n' );
  fprintf ( 1, '  of an R8MAT.\n' );

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

  seed = 123456789;
  [ v, seed ] = r8vec_uniform_01 ( n, seed );
  r8vec_print ( n, v, '  Vector to add to diagonal:' );

  a2 = r8mat_diag_add_vector ( n, a, v );
  r8mat_print ( n, n, a2, '  A + V:' );

  return
end
