Main Content

nargout

Number of output arguments forSystem object

Description

numOutputs= nargout(obj)returns the number of output arguments that are required by theobjalgorithm definition. This function is a System object™ extension of the generalnargoutfunction.

If your System object uses thematlab.system.mixin.Nondirect(Simulink)class,narginreturns the number of output arguments for theupdateImplandoutputImplmethods.

nargoutreturns the number of output arguments specified in the call to the currently executing System object. Use this syntax in the body of a System object only.

Input Arguments

collapse all

System object to query.

Output Arguments

collapse all

This argument represents the number of outputs needed to call the System object.

If the output is nonnegative, the number of outputs cannot change while the object is in use.

If the output is negative, the number of outputs can change from call to call. This situation occurs when the System object does not overridegetNumOutputsImpland thestepImplsignature containsvarargout.

Version History

Introduced in R2018a