Language
C or C++ code generation for simulation targets
Model Configuration Pane: Simulation Target
Description
Specify C or C++ code generation for simulation targets. This configuration parameter affects:
Model reference simulation targets.
Rapid accelerator simulation targets.
Custom code you implement with C Function blocks, C Caller blocks, MATLAB Function blocks, MATLAB System blocks, and Stateflow® charts. If Import custom code is selected, available custom code variables and functions are parsed.
The Simulation cache folder configuration parameter determines where to save the generated C or C++ files.
Category: Simulation Target
Settings
onEnables simulation acceleration by using GPU Coder™. When this option is on, the software generates CUDA® MATLAB® executable (MEX) code from the block and dynamically links the generated code to Simulink® during simulation.
offDisables simulation acceleration by using GPU Coder.
Recommended Settings
| Application | Setting |
|---|---|
| Debugging | On |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | On |
Programmatic Use
Parameter:
SimTargetLang |
| Type: string | character vector |
Value:
"on" | "off" |
Default:
"off" |
Version History
Introduced in R2020b