主要内容

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

removeElement

移除元素

说明

removeElement(interface,name) 从接口 name 中移除名称为 interface 的元素。

示例

示例

全部折叠

在模型的字典中添加数据接口 newInterface。在数据接口中添加数据类型为 newElement 的数据元素 double,然后删除该数据元素。

arch = systemcomposer.createModel("newModel");
systemcomposer.openModel("newModel");
interface = addInterface(arch.InterfaceDictionary,"newInterface");
element = addElement(interface,"newElement",DataType="double");
removeElement(interface,"newElement")

在模型字典中添加物理接口 newPhysicalInterface。在物理接口上添加域类型为 newElement 的物理元素 electrical.electrical,然后删除该物理元素。

arch = systemcomposer.createModel("newModel");
systemcomposer.openModel("newModel");
interface = addPhysicalInterface(arch.InterfaceDictionary,"newPhysicalInterface");
element = addElement(interface,"newElement",Type="electrical.electrical");
removeElement(interface,"newElement")

输入参数

全部折叠

元素名称,指定为字符向量或字符串。元素名称必须是有效的 MATLAB® 变量名。

数据类型: char | string

详细信息

全部折叠

版本历史记录

在 R2019a 中推出

另请参阅

函数

对象

模块

工具