function i4mat_max_index_test ( )

%*****************************************************************************80
%
%% i4mat_max_index_test() tests i4mat_max_index().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 April 2009
%
%  Author:
%
%    John Burkardt
%
  m = 5;
  n = 7;
  b = 0;
  c = 10;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'i4mat_max_index_test():\n' );
  fprintf ( 1, '  i4mat_max_index() locates the maximum;\n' );
 
  a = randi ( [ b, c ], m, n );
 
  i4mat_print ( m, n, a, '  Random array:' );
 
  fprintf ( 1, '\n' );
  [ i, j ] = i4mat_max_index ( m, n, a );
  fprintf ( 1, '  Maximum I,J indices = %6d  %6d\n', i, j );

  return
end
