function r = rref(A)
%RREF   Reduced row echelon form.
%   RREF(A) is the reduced row echelon form of the symbolic matrix A.
%
%   Example:
%       rref(sym(magic(4))) is not the identity.

%   Copyright (c) 1993-98 by The MathWorks, Inc.
%   $Revision: 1.3 $  $Date: 1997/11/29 01:06:02 $

if all(size(A) == 1)
   r = sym(A ~= 0);
else
   r = maple('gaussjord',A);
end;
