<< nargout Core nelsonroot >>

nargoutchk


Checks the number of output arguments.


Syntax


nargoutchk(minArgs, maxArgs)
msg = nargoutchk(minArgs, maxArgs, numArgs)
st = nargoutchk(minArgs, maxArgs, numArgs, 'struct')

Input argument


minArgs

minimum number of accepted outputs (scalar integer value).

maxArgs

maximum number of accepted outputs (scalar integer value).

numArgs

number of function outputs (scalar integer value).

Output argument


msg

a string: error message.

st

a struct with error message and identifier.

Description


nargoutchk checks the number of output arguments of an function.

Example


With an macro function:

nargoutchk(1, 2, 3)
nargoutchk(1, 2, 3, 'struct')

See also


nargout, narginchk.

History


Version Description
1.0.0 initial version

Author


Allan CORNET

<< nargout Core nelsonroot >>