www.gusucode.com > elfun工具箱matlab源码程序 > elfun/sign.m

    %SIGN   Signum function.
%   For each element of X, SIGN(X) returns 1 if the element
%   is greater than zero, 0 if it equals zero and -1 if it is
%   less than zero.  For the nonzero elements of complex X,
%   SIGN(X) = X ./ ABS(X).
%
%   See also ABS.

%   Copyright 1984-2005 The MathWorks, Inc.
%   Built-in function.