主要内容

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

systemcomposer.profile.Profile.createProfile

创建配置文件

    说明

    profile = systemcomposer.profile.Profile.createProfile(profileName) 创建了一个新的配置文件,名称为 profileName

    注意

    在将配置文件移动、复制或重命名到不同目录之前,必须先在配置文件编辑器中或使用 close 函数关闭该配置文件。如果要重命名配置文件,请参照 renameProfile 函数的示例。

    示例

    示例

    全部折叠

    创建一个模型。

    model = systemcomposer.createModel("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");

    将配置文件保存在当前目录下的文件中,文件名为 LatencyProfile.xml

    path = profile.save;

    输入参数

    全部折叠

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

    示例: "LatencyProfile"

    数据类型: char | string

    输出参量

    全部折叠

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

    详细信息

    全部折叠

    版本历史记录

    在 R2019a 中推出