Main Content

readState

Get degradation RUL model state for use at runtime

    Description

    mdlState = readState(mdl) returns a structure containing the properties of the degradation RUL model mdl. Use readState 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, specified as a linearDegradationModel or exponentialDegradationModel RUL model object. readState creates a structure that contains the current property values of mdl.

    Output Arguments

    collapse all

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

    Extended Capabilities

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

    Introduced in R2021a