| Using Simulink | ![]() |
In Programming the Embedded MATLAB Function, you create two output arguments and an input argument for an Embedded MATLAB Function block by entering them in its function header. This creates ports on the Embedded MATLAB Function block that you can attach to Simulink signals. You can select the type for each argument that you define for an Embedded MATLAB Function block. By default, they are assigned the type inherited. This means that type is assigned on the basis of the incoming or outgoing Simulink signal.
Examine the type for an argument in the Model Explorer as follows:
You specify the type of an argument in the Type field of the Data properties pane, as shown. You can also specify it in the Contents pane of the Model Explorer by clicking the cell in the Type column of the highlighted argument row and editing it.
The type of the arguments in the preceding example is inherited. This is the default type for all input and output data. Use the following topics to determine whether you want to keep the inherited type or specify the argument types yourself:
type operator that returns the type of an existing variable.
| Debugging Embedded MATLAB Functions | Inheriting Argument Data Types | ![]() |
© 1994-2005 The MathWorks, Inc.