Main Content

Remove reset function

Removal of unreachable instances of reset functions from generated code

Model Configuration Pane: Code Generation / Interface

Description

The Remove reset function removes unreachable (dead-code) instances of the reset functions from the generated code for systems that include model referencing hierarchies. The reset functions are generated for models containing blocks with states. If you enable this parameter, the code generator checks whether live code will be removed and issues errors if it finds such code.

For instance, the code generator issues an error to turn off the Remove reset function parameter if:

  • You enable this parameter for a model containing blocks with states.

  • The model is part of a conditionally executed subsystem.

The error is issued because the generated code needs to call the reset functions to reset states.

Settings

On (default) | Off
On

Remove unreachable instances of reset functions from the generated code for systems that include model referencing hierarchies.

Off

Generate code without removing unreachable instances of the reset function.

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityOff
EfficiencyOn
Safety precaution

No recommendation

Programmatic Use

Parameter: RemoveResetFunc
Type: character vector
Value: valid MATLAB® variable name
Value: 'on' | 'off'
Default: 'on'

Version History

Introduced in R2016b