function [varargout] = nargout(varargin)
%NARGOUT Number of function output arguments.
%   Inside the body of a user-defined function, NARGOUT returns the
%   number of output arguments that were used to call the function.
%
%   NARGOUT('FUN') returns the number of declared outputs for the
%   M-file function FUN.  The number of arguments is negative if the
%   function has a variable number of output arguments.  FUN can be 
%   the name of a function, or a function handle that maps to a 
%   specific function.
%
%   See also NARGIN, VARARGOUT, NARGCHK, NARGOUTCHK, MFILENAME.

%   Copyright 1984-2004 The MathWorks, Inc. 
%   $Revision: 5.16.4.3 $  $Date: 2004/12/06 16:35:14 $
%   Built-in function.

if nargout == 0
  builtin('nargout', varargin{:});
else
  [varargout{1:nargout}] = builtin('nargout', varargin{:});
end
