User`s guide
Optimizations Common to All Code Formats
12-21
Optimizations Common to All Code Formats
General Modeling Techniques
The following are techniques that you can use with any code format:
• Run slupdate on old models to automatically convert them to use the newest
features.
• Directly inline C MEX S-functions into the generated code by including a
TLC file for the S-function. See Chapter 3 of the Target Language Compiler
Reference Guide for more information on writing a TLC file for inlining an
S-function.
• Use a Simulink data type other than double when possible. The available
data types are Boolean, signed and unsigned 8-, 16-, and 32-bit integers, and
32- and 64-bit floats. A double is a 64-bit float. See Chapter 3 of Using
Simulink for more information on data types.
• Remove repeated values in lookup table data.
• Use the Merge block to merge the output of function-call subsystems. This
block is particularly helpful when controlling the execution of function-call
subsystems with Stateflow. This diagram is an example of how to use the
Merge block.