Scilab keyword

varargin - variable numbers of arguments in an input argument list

Description

A function whose input argument list contains varargin can be called with more input arguments than indicated in the input argument list. The calling arguments passed form varargin keyword onwards may then be retrieved within the function in a list named varargin.

Suppose that varargin keyword is the n th argument of the formal input argument list, then if the function is called with less than n-1 input arguments the varargin list is not defined, if the function is called with n-1 arguments then varargin list is an empty list.

y = function ex(varargin) may be called with any number of input arguments. Within function ex input arguments may be retrieved in varargin(i) ,i=1:length(varargin)

REMARK

Examples

See Also