Main Content


Export model information as MATLAB tables


[exportedSet] = systemcomposer.exportModel(modelName) exports model information for components, ports, connectors, port interfaces, and requirements to be imported into MATLAB® tables. The exported tables have prescribed formats to specify model element relationships, stereotypes, and properties.


Export System Composer Model

To export a model, pass the model name as an argument to the exportModel function. The function returns a structure containing five tables: components, ports, connections, portInterfaces, and requirementLinks.

exportedSet = systemcomposer.exportModel('exMobileRobot')

exportedSet = 

  struct with fields:

          components: [3×4 table]
               ports: [3×5 table]
         connections: [1×4 table]
      portInterfaces: [3×9 table]
    requirementLinks: [4×15 table]

Input Arguments

expand all

Name of model to be exported, specified as a character vector.

Example: 'exMobileRobot'

Data Types: char

Output Arguments

expand all

Model tables, returned as a structure containing tables components, ports, connections, portInterfaces, and requirementLinks.

Data Types: struct

Introduced in R2019a