Maximum number of zero-crossings per step
Maximum number of zero crossings to locate in a single time step
Since R2022a
Model Configuration Pane: Solver
Description
When a discontinuity, or zero crossing, is detected in a simulation where you have zero-crossing detection enabled, the solver tries to determine the time at which the zero crossing occurred through an iterative process. This parameter specifies the maximum number of zero crossings the solver tries to locate within a single simulation time step.
You can adjust the bounded computational cost of the fixed-step zero-crossing algorithm using this parameter and the Maximum number of zero-crossings per step parameter.
Category: Solver
Dependencies
To enable this parameter:
Set the solver Type to
Fixed-step
.Select Enable zero-crossing detection for fixed-step simulation.
Settings
2
| positive scalar integerAllowing the solver to detect more zero crossings per step can produce a more accurate solution but is more computationally intensive.
Recommended Settings
The table summarizes recommended values for this parameter based on considerations related to code generation.
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | No impact |
Safety precaution | No impact |
Programmatic Use
Parameter: MaxZcPerStep |
Type: numeric |
Value: positive scalar integer |
Default: 2 |
Version History
Introduced in R2022a