Main Content

Component-Based Modeling

Modularization, reentrancy, and reuse

The code generator supports conditionally executed nonvirtual subsystems and atomic nonvirtual and virtual subsystem. Often, developers choose to convert subsystems to referenced models to promote modularization and reuse. When you generate reusable code, models with model referencing can potentially require special treatment. For example, models that they reference must be configured to use identical hardware settings.


  • Subsystems
    Generate code for subsystems
  • Referenced Models
    Generate code for referenced models
  • Stateflow Charts
    Generate and reuse code for Stateflow® charts
  • Code Reuse
    Design models from which code generator produces reusable function code
  • Model Protection
    Create a protected model for simulation and code generation to share with a third-party