coder.FunctionSignature
Description
Use a coder.FunctionSignature object to specify an entry-point
function or method. To generate code for a coder.FunctionSignature object,
pass the object to the codegen command by using the
-function option. To generate code for a method that is a
coder.FunctionSignature object, you must specify the enclosing class as an
entry-point class.
Note
Using a MATLAB® class as an entry point for code generation is a tech preview. This
feature is in active development and may change between the tech preview and the general
release. The primary purpose of the tech preview is to solicit feedback from users. To
enable the feature, enter enableCodegenForEntryPointClasses at the
command line before calling the codegen function or creating a coder.Type object in a MATLAB session. To provide feedback, email the
development team or participate
in a survey.
Creation
To create a coder.FunctionSignature object, use the
coder.FunctionSignature function. Alternatively, the code generator creates
this object when you:
Add a method to a
coder.ClassSignatureobject by using theaddMethodmethod.Add a method to a
coder.ClassSignatureobject by modifying the dictionary in theMethodsproperty.
Syntax
Description
specifies options using one or more name-value arguments in addition to the input
arguments in the previous syntax. For example, to set the number of output arguments to
two, set fs = coder.FunctionSignature(___,Name=Value)Nargout to 2.
Input Arguments
Name-Value Arguments
Output Arguments
Properties
Examples
Extended Capabilities
Version History
Introduced in R2026a
See Also
addMethod | codegen | coder.ClassSignature | coder.ClassType | coder.newtype | coder.typeof