I use the mdlInitializeConditions function in my S-function to initialize a work vector element from the current input signal. In some cases I experience unexpected behaviour because the S-function's work vector element is not initialized with the expected value.
MATLAB: How to initialize internal information from an input signal in an S-function in Simulink
initializations-funsfunsimulink
Related Question
- How to initialize internal variable of s-function every simulation
- What is the correct way to specify s-function output initial value
- Does Simulink Accelerator not use all TLC methods even if I use the SS_OPTION_USE_TLC_WITH_ACCELERATOR option in Real-Time Workshop 7.4 (R2009b)
- S-Function: Inital Value as Output
Best Answer