Main Content

restoreState

Restore degradation RUL model state at runtime

Since R2021a

    Description

    restoreState(mdl,mdlState) updates the properties of the degradation RUL model mdl according to the values specified in the structure mdlState. Create mdlState using the readState command. Use readState and restoreState in an entry-point function for code generation to preserve the values of model parameters, particularly when you update the model at run time. For more information, see Generate Code That Preserves RUL Model State for System Restart.

    Input Arguments

    collapse all

    RUL model to update, specified as a linearDegradationModel or exponentialDegradationModel RUL model object.

    Model state, specified as a structure. The fields of mdlState correspond to the properties of mdl, with an extra field that specifies the type of RUL model. Create mdlState using the readState command.

    Extended Capabilities

    C/C++ Code Generation
    Generate C and C++ code using MATLAB® Coder™.

    Version History

    Introduced in R2021a