Main Content

Initial state is array

Diagnostic action to take when initial state for model specified as array

Model Configuration Pane: Diagnostics

Description

The Initial state is array configuration parameter specifies the diagnostic action the software takes when you specify the value of the Initial state parameter for the model as an array.

Array format is not recommended for specifying the initial state. Because the Array format does not include block path information, the software pairs the state values in array with block states in the model based on:

  • The order of the state values in the array

  • The execution order for the model

The execution order can change from one simulation to the next if you modify the model and from one release to the next even if you do not modify the model. If the order of the states in the array does not match the execution order as intended, the simulation can produce unexpected results.

The array format also does not support several options available when you use the Dataset, Structure, or Structure with time format, including:

  • Associating initial state values with the path to the block to which the state applies. This association removes dependencies on the block execution order.

  • Using different data types for each initial state value.

  • Initializing a subset of states.

  • Initializing states for a model hierarchy.

For best results, specify the initial state for the model as a Simulink.op.ModelOperatingPoint object or as a Simulink.SimulationData.Dataset object.

Settings

warning (default) | error | none
warning

The software issues a warning.

error

The software issues an error and terminates the simulation.

none

The software does not issue a diagnostic.

Recommended Settings

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

ApplicationSetting
Debuggingwarning
Traceabilitywarning
Efficiencywarning
Safety precautionwarning

Programmatic Use

Parameter: InitInArrayFormatMsg
Type: string | character vector
Values: "none" | "warning" | "error"
Default: "warning"

Version History

Introduced in R2010a