This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Code Generation for Variable Length Argument Lists

When you use varargin and varargout for code generation, there are these restrictions:

  • You cannot use varargin or varargout in the function definition for a top-level function in a MATLAB Function block or in a Stateflow® chart that uses MATLAB® as the action language.

  • If you use varargin to define an argument to an entry-point function, the code generator produces the function with a fixed number of arguments. This fixed number of arguments is based on the number of arguments that you specify when you generate code.

  • You cannot write to varargin. If you want to write to input arguments, copy the values into a local variable.

  • To index into varargin and varargout, use curly braces {}, not parentheses ().

  • The code generator must be able to determine the value of the index into varargin or varargout.

Related Topics

Was this topic helpful?