varargin
Variable-length input argument list
Syntax
Description
varargin
is an input variable in a
function definition statement that enables the function to accept any number of
input arguments. Specify varargin
by using lowercase
characters. After any explicitly declared inputs, include
varargin
as the last input argument.
When the function executes, varargin
is a
1-by-N cell array, where N is the number
of inputs that the function receives after the explicitly declared inputs. If the
function receives no inputs after the explicitly declared inputs, then
varargin
is an empty cell array.