gp 导出数据字典_Import and Export Dictionary Data 导入和导出字典数据

该文详述如何使用MATLAB的Model Explorer将模型设计数据从数据字典导出到MAT-file或脚本,以及如何将数据导入字典,强调了设计数据和非设计数据的区别以及导入导出的步骤。
摘要由CSDN通过智能技术生成

9679d8083c870b948f6e1723182de442.png

以后翻译一些matlab用户手册吧,机器翻译加上双语阅读,简单明了Export Design Data from Dictionary

从字典中导出设计数据

This example shows how to export model design data from a data dictionary into a MAT-file or MATLAB script.

此示例演示如何将模型设计数据从数据字典导出到MAT-file或MATLAB脚本。

1 In the Simulink Editor, in the Modeling tab, click Model Explorer to open the Model Explorer.在SimulinkEditor中的Modeling选项卡中,单击modelexplorer以打开modelexplorer。

2 Open a data dictionary using File > Open Data Dictionary.使用文件开放数据字典打开数据字典。

3 In the Model Hierarchy pane, expand the dictionary node and select Design Data > Export to File. Then save the design data to a MAT-file or MATLAB script.、在“模型层次结构”窗格中,展开字典节点并选择“设计数据导出到文件”。然后将设计数据保存到MAT-file或MATLAB脚本中。

ba0b6bd845fbce4954e1fb699536053a.png

The dictionary does not export enumerated data types (which are stored as Simulink.data.dictionary.EnumTypeDefinition objects). To transfer or copy an enumerated type from one dictionary to another, use the Model Explorer to cut or copy and paste the object.

Dictionary不导出枚举数据类型(这些数据类型存储为Simulink.data.dictionary。Enumtypedefinition对象)。若要将枚举类型从一个字典转移或复制到另一个字典,请使用模型资源管理器剪切或复制并粘贴对象。

Import Data to Dictionary from File

从文件导入数据到字典

You can import data from a MATLAB file or MAT-file to a data dictionary using the Model Explorer window. Import variables and data objects that are used by a model during simulation to the Design Data section of a dictionary. Import variables and objects that you want to store with a model, but that are not used by the model during simulation, to the Other Data section of a dictionary.

您可以使用ModelExplorer窗口将数据从MATLAB文件或MAT-file导入到数据字典中。将模型在模拟期间使用的变量和数据对象导入到字典的DesignData部分。将您希望用模型存储但模型在模拟期间不使用的变量和对象导入到字典的其他数据部分。

Import Design Data from File

从文件导入设计数据

This example shows how to import design data from a file into the Design Data section of a dictionary.

此示例演示如何将设计数据从文件导入字典的“设计数据”部分。

1 In the Simulink Editor, in the Modeling tab, click Model Explorer to open the Model Explorer.

在SimulinkEditor中的Modeling选项卡中,单击modelexplorer以打开modelexplorer。

2 Select File > Open. Then browse to an existing dictionary.

选择文件打开。然后浏览到一个现有的字典。

3 In the Model Hierarchy pane, right-click the Design Data section of the dictionary and select Import from File. Then browse to and select the MAT-file or MATLAB file that contains the data to import.

在“模型层次结构”窗格中,右键单击字典的“设计数据”部分,并选择“从文件导入”。然后浏览并选择包含要导入的数据的MAT-file或MATLAB文件。

f9e9d54457aa6585faa1654bb8368e0f.png

Design data from the MAT-file populate the dictionary. Data appear with DataSource set to the name of the dictionary.

来自MAT-file的设计数据填充字典。数据显示时将DataSource设置为字典的名称。

5fb4dc54d72719550980dcba19b3dcf7.png

If you import from the same MAT-file again, Simulink only imports changed or new entries into the dictionary.

如果再次从相同的MAT-file导入,则Simulink只将更改或新条目导入到字典中。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值