Shape preservation
Option to preserve shape of states using derivative information at each time step
Model Configuration Pane: Solver
Description
The Shape preservation parameter specifies whether the solver uses information about state derivatives at each time step to preserve the shape of each state and improve simulation accuracy.
When you configure a referenced model to use a local solver, the Shape preservation parameter of the referenced model specifies whether to preserve the shape of states in the referenced model. (since R2025a)
Dependencies
To enable this parameter:
Set the solver Type to
Variable-step
.Set the Solver parameter to a value other than
discrete (no continuous states)
.
Settings
Disable all
(default) | Enable all
Disable all
No shape preservation performed for any states. This option typically provides sufficient accuracy for most models.
Enable all
Shape preservation performed for all states. This option can increase accuracy in models with state derivatives that have high rates of change. Shape preservation increases computational complexity and might decrease simulation speed.
Programmatic Use
Parameter: ShapePreserveControl |
Type: string | character vector |
Value:
"EnableAll" | "DisableAll" |
Default:
"DisableAll" |
Version History
Introduced in R2008a