R = nargout()
R = nargout(function_name)
R = nargout(function_handle)
| Parameter | Description |
|---|---|
| function_name | a string: function name |
| function_handle | a function handle |
| Parameter | Description |
|---|---|
| R | an integer value: number of output argument |
nargout returns the number of output arguments of an function.
If the last output argument of the function is varargout the returned value is negative.
nargout('cellstr')
nargout('cos')
| Version | Description |
|---|---|
| 1.0.0 | initial version |