Main Content

Shape preservation

Option to preserve shape of states using derivative information at each time step

Model Configuration Pane: Solver

Description

Shape preservation uses the information about state derivatives at each time step to preserve the shape of each state and improve simulation accuracy.

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.

Recommended Settings

The table summarizes recommended values for this parameter based on considerations related to code generation.

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Programmatic Use

Parameter: ShapePreserveControl
Type: string | character vector
Value: 'EnableAll' | 'DisableAll'
Default: 'DisableAll'

Version History

Introduced in R2008a