Initialize the state vectors of this MATLAB S-function
representing the Level-2 MATLAB S-Function block.
The Simulink® engine invokes this optional method at the beginning of a simulation. The method performs initialization activities that this S-function requires only once, such as allocating memory, setting up user data, or initializing states.
If your S-function resides in an enabled subsystem and needs
to reinitialize its states every whenever the subsystem is enabled,
InitializeConditions to initialize the state
values, instead of
Use the properties of
get the states.