Main Content

loadBuildInfo

R2026b

Load build information from MAT file

Since R2026b

    Description

    [buildInfo,buildOpts] = loadBuildInfo(buildInfoPath) loads the build information file buildInfo.mat from the specified path buildInfoPath and returns the build information object and build options.

    In addition to loading the build information, the function updates the paths in the build information to be consistent with the location where the file is loaded from.

    example

    Examples

    collapse all

    Create a build information object and build options, then save them to a buildinfo.mat file.

    buildInfo = RTW.BuildInfo;
    BuildOpts = coder.make.BuildOpts;
    saveBuildInfo(buildInfo,buildOpts);
    

    Load build information from the current folder.

    [bi,opts] = loadBuildInfo(pwd);

    Input Arguments

    collapse all

    Path to the build information, specified as a string scalar or character vector. The value is a path to the folder containing a buildInfo.mat file. The path can be absolute or relative to the current folder. If the path is empty, the current folder is used. Optionally, you can append the file name buildInfo.mat to the path.

    Data Types: string | char

    Output Arguments

    collapse all

    Build information object, returned as an RTW.BuildInfo object. The internal paths are updated to match the folder from which the buildinfo.mat file was loaded.

    Build options, returned as a coder.make.BuildOpts object. If the MAT file does not contain a buildOpts field, the function returns an empty array of coder.make.BuildOpts objects.

    Version History

    Introduced in R2026b