Main Content

Enable continuous-time MATLAB functions to write to initialized persistent variables

Description

Enables continuous-time MATLAB® functions to write to initialized persistent variables. If disabled, continuous-time MATLAB functions can only initialize and read persistent variables. To initialize a persistent variable, check that it is empty before assigning a value. For more information, see Initialize Persistent Variables in MATLAB Functions.

Category:Simulation Target

Settings

Default: Off

Off

Continuous-time MATLAB functions can only initialize and read persistent variables.

On

Continuous-time MATLAB functions can write to initialized persistent variables.

Tips

  • Enable this configuration to ensure legacy functionality in models designed in releases older than R2017b.

Command-Line Information

Parameter: LegacyBehaviorForPersistentVarInContinuousTime
Value: 'on' | 'off' |
Default: 'off'

Recommended Settings

ApplicationSetting
Debugging

No impact

Traceability

No impact

Efficiency

No impact

Safety precaution

No impact

Related Topics