主要内容

本页采用了机器翻译。点击此处可查看英文原文。

systemcomposer.loadProfile

按名称加载配置文件

    说明

    profile = systemcomposer.loadProfile(profileName) 用指定的文件名加载配置文件。

    示例

    示例

    全部折叠

    创建一个模型。

    model = systemcomposer.createModel("archModel");
    systemcomposer.openModel("archModel");

    创建带有构造型和属性的配置文件,打开配置文件编辑器,然后将配置文件应用到模型。

    profile = systemcomposer.profile.Profile.createProfile("LatencyProfile");
    latencybase = profile.addStereotype("LatencyBase");
    latencybase.addProperty("latency",Type="double");
    latencybase.addProperty("dataRate",Type="double",DefaultValue="10");
    systemcomposer.profile.editor(profile)
    model.applyProfile("LatencyProfile");

    保存配置文件并加载配置文件。在此示例中,profileNew 等于 profile

    save(profile);
    profileNew = systemcomposer.loadProfile("LatencyProfile");

    输入参数

    全部折叠

    配置文件的名称,指定为字符向量或字符串。配置文件必须在 MATLAB® 路径上可用,扩展名为 .xml

    示例: "LatencyProfile"

    数据类型: char | string

    输出参量

    全部折叠

    配置文件,以 systemcomposer.profile.Profile 对象的形式返回。

    详细信息

    全部折叠

    版本历史记录

    在 R2019a 中推出