Writing S-Functions    

The Inlined Code

The code generated when you inline your wrapper S-function is similar to the default generated code. The MdlTerminate function no longer contains a call to an empty function and the MdlOutputs function now directly calls my_alg.

In addition, wrapper.reg no longer creates a child SimStruct for the S-function since the generated code is calling my_alg directly. This eliminates over 1K of memory usage.


 The TLC S-Function Wrapper Fully Inlined S-Functions