Documentation

Final states

Description

Saves the logged states of the model at the end of a simulation to the specified MATLAB®variable.

Category:Data Import/Export

Settings

Default:Off,xFinal

On

万博1manbetx®software exports final logged state data to the MATLAB workspace during simulation.

Specify the name of the MATLAB variable in which to store the values of these final states. SeeImporting and Exporting Statesfor more information.

Off

Simulink software does not export the final state data during simulation.

Tips

  • You must select theFinal statescheck box before entering the final states variable.

  • 万博1manbetx仿真软件软件保存在MATL最终状态AB workspace variable having the specified name.

  • The saved data has the format that you specify with theFormatparameter.

  • Simulink creates empty variables for final state logging (xfinal) if both of these conditions apply:

    • You enableFinal states.

    • A model has no states.

  • Using theFinal statesis not always sufficient for complete and accurate restoration of a simulation state. The SimState object contains the set of all variables that are related to the simulation of a model. For details, seeSave complete SimState in final stateandSave and Restore Simulation State as SimState.

  • SeeState Informationfor more information.

  • If you use a format other than Dataset, you can convert the logged data to Dataset format. Converting the data to Dataset makes it easier to postprocess with other logged data. For more information, seeDataset Conversion for Logged Data.

Command-Line Information

Parameter:SaveFinalState
Value:'on'|'off'
Default:'off'
Parameter:FinalStateName
Type:character vector
Value:any valid value
Default:'xFinal'

Recommended Settings

Application Setting
Debugging No impact
Traceability No impact
Efficiency No recommendation
Safety precaution No recommendation

Related Topics

Was this topic helpful?