Modeling Guidelines and Block Usage
Modeling guidelines provide information about model settings, block usage, and block parameters. When you develop models and generate code for specific applications, use modeling guidelines.
To assess model design and code quality, and verify adherence to modeling guidelines, use Model Advisor checks. For more information, see Check Your Model Using the Model Advisor.
- Use Products and Blocks Supported for Code Generation
Identify products and blocks that support Simulink® Coder™Embedded Coder® code generation.
- Consider Modeling Semantics when Generating Code
Data propagation, sample time propagation, latches for subsystem blocks, block execution order, and algebraic loops.
- Modeling Guidelines for Blocks
Code generation modeling guidelines include recommended model settings, block usage, and block parameters.
- Modeling Guidelines for Model Configuration
When you develop models and generate code, use the modeling guideline configuration recommendations.
- Switch Between Output Waveforms During Code Execution for Waveform Generator Block
This example shows how to generate code that enables you to switch between stimulus waveforms during code execution.
- Tune Phase Parameter of Sine Wave Block During Code Execution
Under certain conditions, you cannot configure the Phase parameter of a Sine Wave block to appear in the generated code as a tunable global variable (for more information, see the block reference page).