coder.Function - Description of MATLAB function used in code generation - MATLAB (original) (raw)
Main Content
coder.Function Properties
Description of MATLAB function used in code generation
coder.Function
properties contain the description of a MATLAB® function that is used in code generation. Allcoder.Function
properties are read-only. You can use dot notation to query these properties.
You do not directly create a coder.Function
object. Acoder.ReportInfo
object contains one coder.Function
object for every MATLAB function that is used in code generation. These coder.Function
objects are automatically created when you export code generation report information to acoder.ReportInfo
object. For more information, see coder.ReportInfo Properties and Access Code Generation Report Information Programmatically.
Name
— Name of function
character vector
This property is read-only.
Name of a MATLAB function used in code generation, specified as a character vector.
Example: 'foo'
Data Types: char
Specialization
— Specialization identifier of a function
double
This property is read-only.
The specialization identifier of a MATLAB function used in code generation. A value of zero indicates that the function is not specialized. A positive value indicates that the function is specialized.
Data Types: double
File
— MATLAB file containing the function
coder.CodeFile
object | coder.File
object
This property is read-only.
A description of the MATLAB file that contains the function used in code generation.
- If the file contains text, this property is a
coder.CodeFile
object. See coder.CodeFile Properties. - If the file does not contain text (for example, a P-coded file), this property is a
coder.File
object. See coder.File Properties.
StartIndex
— Index of the first character of the function in the text of the file
double
This property is read-only.
1-based index of the first character of the function in the text of the file. If the file does not contain text (for example, a P-coded file), this property is equal to0
.
To manually inspect the code, the line and column numbers corresponding toStartIndex
are useful. Use the getLineColumn function to obtain that information.
Data Types: double
EndIndex
— Index of the last character of the function in the text of the file
double
This property is read-only.
1-based index of the last character of the function in the text of the file. If the file does not contain text (for example, a P-coded file), this property is equal to0
.
To manually inspect the code, the line and column numbers corresponding toEndIndex
are useful. Use the getLineColumn function to obtain that information.
Data Types: double
Variables
— Variables that the function uses
array of coder.Variable
objects
This property is read-only.
The array consists of one coder.Variable
object for each variable the function uses, including input, output, and local variables.
Each coder.Variable
object has these properties:
Name
: Name of the variable, specified as a character vector.Scope
: Scope of the variable, specified as a character vector. Possible scope values are:'Input'
,'Output'
,'Local'
,'Global'
,'Persistent'
, and'InputOutput'
.Type
: Data type of the variable specified as a coder.Type object.
This property is applicable only in the context of the MATLAB function report of a MATLAB Function block. See Programmatically Access MATLAB Function Reports (Simulink).
Callees
— MATLAB functions and methods that are called by this function
array of coder.Function
objects | array of coder.Method
objects
This property is read-only.
Heterogeneous array containing descriptions of MATLAB functions and methods that are called by this function. Each element of the array contains a description of one function or method.
- Array elements containing descriptions of functions are
coder.Function
objects. - Array elements containing descriptions of methods are
coder.Method
objects. See coder.Method Properties.
Version History
Introduced in R2019a