function r8mat_add_test ( )

%*****************************************************************************80
%
%% R8MAT_ADD_TEST tests R8MAT_ADD.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    28 July 2016
%
%  Author:
%
%    John Burkardt
%
  m = 4;
  n = 4;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8MAT_ADD_TEST\n' );
  fprintf ( 1, '  R8MAT_ADD computes C = alpha * A + beta * B for R8MAT''s.\n' );

  alpha = 3.0;

  a = r8mat_indicator ( m, n );

  beta = 0.5;

  b = a';

  c = r8mat_add ( m, n, alpha, a, beta, b );

  r8mat_print ( m, n, a, '  A:' );
  r8mat_print ( m, n, b, '  B:' );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  ALPHA = %g, BETA = %g\n', alpha, beta );

  r8mat_print ( m, n, c, '  C = alpha * A + beta * B:' );

  return
end
