| 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 examine or specify the size of an argument in the Model Explorer as follows:
You specify the size of an argument in the Model Explorer in the Size field of the Data properties pane on the right. You can also specify it in the Contents pane of the Model Explorer by clicking the cell in the Size column of the highlighted argument row and editing it.
The size of the arguments in the preceding example is -1. This is the default size for inputs and outputs. It specifies that the size of the argument is inherited from the Simulink signal that connects to it. Use the following topics to determine whether you want to keep the inherited size or size the arguments yourself.
| Specifying Argument Types with Expressions | Inheriting Argument Sizes from Simulink | ![]() |
© 1994-2005 The MathWorks, Inc.