function i4mat_rref_test ( )

%*****************************************************************************80
%
%% i4mat_rref_test() tests i4mat_rref().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    18 August 2018
%
%  Author:
%
%    John Burkardt
%
  m = 4;
  n = 7;

  a = [ ...
    1, -2, 3, -1; ...
    3, -6, 9, -3; ...
    0,  0, 0,  0; ...
    2, -2, 0,  1; ...
    6, -8, 6,  0; ...
    3,  3, 6,  9; ...
    1,  1, 2,  3 ]';

  fprintf ( 1, '\n' );
  fprintf ( 1, 'i4mat_rref_test():\n' );
  fprintf ( 1, '  i4mat_rref() computes the integer reduced row echelon form of an I4MAT.\n' );

  i4mat_print ( m, n, a, '  Input A:' );

  [ a, det ] = i4mat_rref ( m, n, a );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  The pseudo-determinant = %d\n', det );

  i4mat_print ( m, n, a, '  IRREF form:' );

  return
end
