Main Content

System Derivatives

Specify external system derivative code

  • System Derivatives block

Libraries:
Simulink Coder / Custom Code

Description

For a model or nonvirtual subsystem that includes the System Derivatives block and a block that computes continuous states, the code generator adds external code, which you specify, to the SystemDerivatives function that it generates. You can specify code for the code generator to add to the declaration, execution, and exit sections of the function code.

If you include this block in a referenced model, the code generator ignores the block for simulation target builds, but processes the block for other system target files.

Note

This block is intended to address special case requirements for inserting custom code into the generated code. See the C Caller and C Function blocks, which are more typically used for integrating custom algorithmic code into a model.

Parameters

expand all

Specify code that you want the code generator to add to the declaration section of the SystemDerivatives function for the model or subsystem.

Specify code that you want the code generator to add to the execution section of the SystemDerivatives function for the model or subsystem.

Specify code that you want the code generator to add to the exit section of the SystemDerivatives function for the model or subsystem.

Version History

Introduced in R2006a