主要内容

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

systemcomposer.createModel

创建 System Composer 模型

    说明

    model = systemcomposer.createModel(modelName,FileType=fileType) 创建名称为 modelName 的 System Composer™ 模型或子系统,并返回 systemcomposer.arch.Model 对象。

    示例

    model = systemcomposer.createModel(modelName,modelType,FileType=fileType) 创建一个名称为 modelName、类型为 modelType 的 System Composer 模型或子系统,并返回 systemcomposer.arch.Model 对象。

    示例

    全部折叠

    创建模型并显示其属性

    model = systemcomposer.createModel("model_name")
    model = 
    
      model with properties:
    
                       Name: 'model_name'
               Architecture: [1×1 systemcomposer.arch.Architecture]
             SimulinkHandle: 2.0005
                      Views: [0×0 systemcomposer.view.ViewArchitecture]
                   Profiles: [0×0 systemcomposer.profile.Profile]
        InterfaceDictionary: [1×1 systemcomposer.interface.Dictionary]

    输入参数

    全部折叠

    新模型或子系统的名称,指定为字符向量或字符串。该名称必须是有效的 MATLAB® 标识符。

    示例: "model_name"

    数据类型: char | string

    要创建的模型或子系统类型,指定为 "Architecture" 表示架构,"SoftwareArchitecture" 表示软件架构,"AutosarArchitecture" 表示 AUTOSAR 架构。

    数据类型: char | string

    要创建的文件类型,架构模型指定为 "Model",架构子系统指定为 "Subsystem"

    数据类型: char | string

    输出参量

    全部折叠

    架构模型,以 systemcomposer.arch.Model 对象的形式返回。

    详细信息

    全部折叠

    版本历史记录

    在 R2019a 中推出

    全部展开