Contenuto principale

Data Copy Reduction

Adjust model parameters to improve code execution speed and reduce memory usage

Reduce RAM and ROM consumption and increase code execution speed by eliminating data copies in the generated code. The code generator eliminates some data copies. You can eliminate other data copies by adjusting certain model parameter settings, specifying the same name for the input and output arguments of MATLAB Function blocks, and by using Simulink signals to specify reuses.

Model Settings

Inline invariant signalsTransform symbolic names of Invariant signals in generated code
Eliminate superfluous local variables (Expression folding)Specify to fold expressions into single expression
Function inlining between user functionsControl inlining for calls from user-written functions to other user-written functions (Since R2025a)
Function inlining between MathWorks functionsControl inlining for calls from MathWorks functions to other MathWorks functions (Since R2025a)
Function inlining between user and MathWorks functionsControl inlining for calls from user-written functions to MathWorks functions and from MathWorks functions to user-written functions (Since R2025a)

Topics