Function Reference
— Built-in Function: nargin ()
— Built-in Function: nargin (fcn_name)

Within a function, return the number of arguments passed to the function. At the top level, return the number of command line arguments passed to Octave. If called with the optional argument fcn_name, return the maximum number of arguments the named function can accept, or -1 if the function accepts a variable number of arguments.