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 because the generated code is calling my_alg directly. This eliminates over 1K of memory usage.


  TLC S-Function Wrapper Fully Inlined S-Functions