function r = rank(A)
%RANK   Symbolic matrix rank.
%   RANK(A) is the rank of the symbolic matrix A.
%
%   Example:
%       rank([a b;c d]) is 1.

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

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