function i4mat_ref_test ( )

%*****************************************************************************80
%
%% I4MAT_REF_TEST tests I4MAT_REF.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL 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_REF_TEST\n' );
  fprintf ( 1, '  I4MAT_REF computes the integer row echelon form of an I4MAT.\n' );

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

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

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

  i4mat_print ( m, n, a, '  IREF of A:' );

  return
end
