| Using Simulink | ![]() |
Inheriting Argument Sizes from Simulink
You can tell an Embedded MATLAB Function block to inherit the size of an argument from Simulink by entering a -1 in its Size field in the Model Explorer. This is the default setting for arguments that you add in the function header of an Embedded MATLAB Function block.
Once you compile the model, the CompiledSize column of the Model Explorer gives the actual size used in the compiled simulation application. To conveniently compile the model from the Embedded MATLAB Editor, click the Build tool
.
Sizing of input arguments is complete for all cases. The size of an output argument is the size of the value that is assigned to it. If the expected size in Simulink does not match, a mismatch error occurs during compilation of the model.
| Note No arguments with inherited sizes are allowed for Embedded MATLAB Function blocks in a library. |
| Sizing Function Arguments | Specifying Argument Sizes with Expressions | ![]() |
© 1994-2005 The MathWorks, Inc.