%% Inputs to Function That Uses varargin
% Determine how many inputs a function that uses varargin can accept.
% In a file named mynewplot.m, create a function that accepts numeric inputs x and y and any number of additional plot inputs using varargin.

type mynewplot.m

% Query how many inputs newplot can accept.

fx = 'mynewplot';
nargin(fx)

% The minus sign indicates that the third input is varargin. The mynewplot function can accept an indeterminate number of additional input arguments.
% Copyright 2012 The MathWorks, Inc.