Variable-length input argument list
varargin
is an input variable in a
function definition statement that enables the function to accept any number of
input arguments. Specify varargin
using lowercase characters,
and include it as the last input argument after any explicitly declared
inputs.
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. However,
if the function receives no inputs after the explicitly declared inputs, then
varargin
is an empty cell array.