function r8mat_power_test ( )

%*****************************************************************************80
%
%% R8MAT_POWER_TEST tests R8MAT_POWER.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    02 August 2018
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8MAT_POWER_TEST\n' );
  fprintf ( 1, '  R8MAT_POWER computes the P-th power of a matrix;\n' );
 
  n = 3;

  a = [ ...
    1.0, 2.0, 3.0;
    0.0, 2.0, 1.0;
    0.0, 4.0, 3.0 ];

  r8mat_print ( n, n, a, '  Matrix A:' );

  for p = 0 : 3
    label = sprintf ( '  Matrix A^%d', p );
    ap = r8mat_power ( n, a, p );
    r8mat_print ( n, n, ap, label );
  end

  return
end
