function X = minus(A, B)
%MINUS  Symbolic subtraction.
%   MINUS(A,B) overloads symbolic A - B.
    
%   Copyright (c) 1993-98 by The MathWorks, Inc.
%   $Revision: 1.11 $  $Date: 1997/11/29 01:05:52 $

A = sym(A);
B = sym(B);

% Scalar expansion
if any(size(A) ~= size(B))
   if all(size(A)==1)
      A = A(ones(size(B)));
   elseif all(size(B)==1)
      B = B(ones(size(A)));
   else
      error('Matrix dimensions must agree.');
   end
end

X = maple(A,'-',B);

% Fix case where Maple returns a scalar
if any(size(X) ~= size(A))
   X = X(ones(size(A)));
end
