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, then you must specify that the mask modifies the appearance of the block. To do this, execute this command
set_param('block','MaskSelfModifiable','on')
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 | ![]() |