Main Content

loadRULModelForCoder

Load and reconstruct RUL model from file for use in code generation

    Description

    mdl= loadRULModelForCoder(filename)reconstructs an RUL model object from properties stored infilname, which is a file created usingsaveRULModelForCoder. UseloadRULModelForCoderin an entry-point function for code generation to reconstruct the model at compile time. SeeGenerate Code for Predicting Remaining Useful Lifefor more information.

    Input Arguments

    collapse all

    File containing saved model, specified as a character vector or string.filenameis a file created usingsaveRULModelForCoder. You can specify a full or relative path infilename.

    Output Arguments

    collapse all

    RUL model loaded from file, returned as alinearDegradationModelorexponentialDegradationModelobject. The RUL model has the same type and property values as the model used to createfilename.

    Tips

    • loadRULModelForCoderloads the model at compile time, not at run time. Therefore, any changes you make to the MAT file after compiling are not available at run time. To update the state of the model at run time, userestoreState.

    Extended Capabilities

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

    Introduced in R2021a