Simulink.Mask 类
命名空间: Simulink
以编程方式控制封装
描述
使用 Simulink.Mask
类的实例可执行以下操作:
创建、复制和删除封装。
创建、编辑和删除封装参数。
确定拥有封装的模块。
获取为封装定义的工作区变量。
属性
相关联的模块的封装类型,指定为字符向量或字符串。
数据类型: char
| string
模块的描述,指定为字符向量或字符串。
数据类型: char
| string
封装模块的帮助文本,指定为字符向量或字符串。
数据类型: char
| string
封装模块的初始化命令,指定为字符向量或字符串。
数据类型: char
| string
允许模块修改其内容的选项,指定为逻辑值。
数据类型: logical
模块图标的 MATLAB 代码,指定为字符向量或字符串。
数据类型: char
| string
模块边框的可见性,指定为逻辑值。
数据类型: logical
使图标不透明的选项,指定为逻辑值。
不透明:使图标不透明。
透明:使图标透明。
数据类型: logical
在执行封装图标命令之前运行封装初始化命令的选项,指定为枚举数据类型。
数据类型: enum
随模块旋转图标的选项,指定为枚举数据类型。
数据类型: enum
端口旋转类型,指定为枚举数据类型。将此属性设置为 default
以在顺时针旋转后对端口进行重新排序,以保持从左到右的端口编号顺序(对于位于模块上下两端的端口)以及从上到下的端口编号顺序(对于位于模块左右两侧的端口)。将此属性设置为 physical
可随模块旋转端口,而不会在顺时针旋转后对其重新排序。
数据类型: enum
绘图命令的单位,指定为枚举类型。autoscale
会缩放图标以适应模块边框。normalized
在左下角为 (0,0)、右上角为 (1,1) 的模块边框内绘制图标。只显示从 0 到 1 的 X 和 Y 值。调整模块大小时,图标也会随之调整大小。pixels
使用以像素表示的 X 和 Y 值绘制图标。在调整模块大小时,图标大小不会自动调整。
数据类型: enum
如果在单独的 MAT 文件中有封装初始化代码和回调代码,则使用此选项将回调文件与模型一起保存;指定为逻辑值。
数据类型: logical
包含封装初始化代码和回调代码的回调文件的名称,指定为字符向量或字符串。
数据类型: char
| string
封装参数属性,指定为 Simulink.MaskParameter
对象。
端口标识符属性,指定为 Simulink.Mask.PortIdentifiers
对象。
添加或删除参数约束规则的选项,指定为 Simulink.Mask.Constraints
对象。
参数之间的约束,指定为 Simulink.Mask.CrossParameterConstraints
。
添加或删除端口约束的选项,指定为 Simulink.Mask.PortConstraint
对象。
添加或删除封装模块端口约束的选项,指定为 Simulink.Mask.CrossPortConstraint
对象。
方法
addCrossParameterConstraint | Add cross-parameter constraint |
addCrossPortConstraint | Create cross-port constraint among ports of the same masked block |
addCrossPortParameterConstraint | Create cross port parameter constraint between ports and parameters of same masked block |
addDialogControl | Add dialog control elements to mask dialog box |
addParameter | 向封装中添加参数 |
addParameterConstraint | Add parameter constraint to a mask |
addPortConstraint | Create port constraint on a mask object |
addPortConstraintAssociation | Associate port constraints to port identifiers |
addPortIdentifier | Creates a port identifier to identify port in mask |
copy | Copy mask from one block to another |
delete | Unmask a block and delete the mask from memory |
getAssociatedParametersOfConstraint | Get mask parameters associated with a constraint |
getCrossParameterConstraint | Get cross-parameter constraint |
getCrossPortConstraint | Display attributes of cross-port constraint |
getCrossPortParameterConstraint | Display attributes of cross port parameter constraint |
getDialogControl | Search for a specific dialog control on the mask |
getDialogControls | Retrieve root level containers from a masked block |
getOwner | Determine the block that owns a mask |
getParameter | 按名称获取封装参数 |
getParameterConstraint | Get mask parameter constraint properties |
getPortConstraint | Displays attributes of specified port constraint |
getPortConstraintAssociation | Displays port identifiers associated with port constraint |
getPortIdentifier | Displays attributes of specified port identifier |
getWorkspace | Create mask workspace object |
getWorkspaceVariables | Get variables defined in mask workspace for masked block |
insertParameter | Create and insert mask parameter at a specified index |
isMaskWithDialog | Check if block mask contains dialog controls and parameters |
isSimpleMask | Check if block mask contains only mask dialog controls |
numParameters | Display number of parameters in a mask |
removeAllCrossParameterConstraints | Delete all cross-parameter constraints from a mask |
removeAllCrossPortConstraints | Remove all cross-port constraints from mask object |
removeAllCrossPortParameterConstraints | Remove all cross port parameter constraints from mask object |
removeAllParameterConstraints | Delete all mask parameter constraints |
removeAllParameters | Remove all existing parameters from a mask |
removeAllPortConstraintAssociation | Removes the associations of all port constraints from mask |
removeAllPortConstraints | Remove all port constraints on masked block |
removeAllPortIdentifiers | Removes all port identifiers from mask object |
removeCrossParameterConstraint | Delete a cross-parameter constraint |
removeCrossPortConstraint | Remove cross-port constraint |
removeCrossPortParameterConstraint | Remove cross port parameter constraint |
removeDialogControl | Remove dialog control from mask dialog box |
removeParameter | Remove parameter from mask dialog box |
removeParameterConstraint | Delete a mask parameter constraint |
removePortConstraint | Remove specified port constraint |
removePortConstraintAssociation | Remove association between port constraint and port identifiers |
removePortIdentifier | Removes specified port identifier from mask object |
set | |
Simulink.Mask.create | Create a mask on a Simulink block |
get | 从指定的模块中返回封装 |
版本历史记录
在 R2010a 中推出
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)