Writing S-Functions | ![]() ![]() |
Masked Multiport S-Functions
If you are developing masked multiport S-function blocks whose number of ports varies based on some parameter, and if you want to place them in a Simulink library, you must specify that the mask modifies the appearance of the block. To do this, execute the command
at the MATLAB prompt before saving the library. Failure to specify that the mask modifies the appearance of the block means that an instance of the block in a model reverts to the number of ports in the library whenever you load the model or update the library link.
![]() | Scalar Expansion of Inputs | Custom Data Types | ![]() |