function r8mat_norm_fro_affine_test ( )

%*****************************************************************************80
%
%% r8mat_norm_fro_affine_test() tests r8mat_norm_fro_affine().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    28 July 2015
%
%  Author:
%
%    John Burkardt
%
  m = 5;
  n = 4;
  a = rand ( m, n );
  b = rand ( m, n );

  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8MAT_NORM_FRO_AFFINE_TEST\n' );
  fprintf ( 1, '  R8MAT_NORM_FRO_AFFINE computes the Frobenius norm\n' );
  fprintf ( 1, '  of the difference of two R8MAT''s;\n' );

  t1 = 0.0;
  for i = 1 : m
    for j = 1 : n
      t1 = t1 + ( a(i,j) - b(i,j) ) ^ 2;
    end
  end

  t1 = sqrt ( t1 );

  t2 = r8mat_norm_fro_affine ( m, n, a, b );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Expected norm = %g\n', t1 );
  fprintf ( 1, '  Computed norm = %g\n', t2 );

  return
end
