function r8mat_max_index_test ( )

%*****************************************************************************80
%
%% r8mat_max_index_test() tests r8mat_max_index().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    19 April 2009
%
%  Author:
%
%    John Burkardt
%
  m = 5;
  n = 3;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8MAT_MAX_INDEX_TEST\n' );
  fprintf ( 1, '  For an R8MAT,\n' );
  fprintf ( 1, '  R8MAT_MAX_INDEX locates the maximum entry;\n' );
 
  a = 10.0 * rand ( m, n );

  r8mat_print ( m, n, a, '  Random array:' );
 
  [ i, j ] = r8mat_max_index ( m, n, a );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Maximum I,J indices = (%d,%d)\n', i, j );

  return
end
