Option to log final state values
Model Configuration Pane: Data Import/Export
Specify whether to log the final values of block states in the model at the end of simulation using the specified variable name. You can use the final states data as the initial state for another simulation.
When you want to use final states data as the initial state for another simulation, consider selecting Save final operating point. The model operating point contains complete information about the simulation state, including block states, hidden block states, the state of the solver and execution engine, and output values for some blocks. When you use a model operating point as the initial state, the simulation results are the same as a simulation that runs from the beginning. When you specify initial states using logged states data alone, the simulation results might not match. For more information, see Specify Initial State for Simulation.
The software does not save final state values at the end of simulation.
At the end of the simulation, the software saves the final state values. By default, the final state values are stored in the variable
xFinal. To use a different variable name for final states data, specify a valid MATLAB® variable name in the text box.
The final states data has the format you specify using the Format parameter.
The final states data is empty when the model does not contain any states or contains only hidden states.
To use final state data as the initial state for another simulation, set the Format parameter to
Datasetif your model contains bus-valued states.
The table summarizes recommended values for this parameter based on considerations related to code generation.
|Safety precaution||No recommendation|
|Type: string | character vector|
|Value: valid MATLAB variable name|
Introduced before R2006a