labelnode
为图节点添加标签
说明
示例
输入参数
nodeIDs
— 节点标识符
逻辑向量 | 节点索引 | 节点名称
节点标识符,指定为逻辑向量,或指定为一个或多个节点索引或节点名称。如果 nodeIDs
是逻辑向量,则其长度必须与图中的节点数相匹配。
下表显示通过数值节点索引或节点名称引用一个或多个节点的不同方法。
形式 | 单一节点 | 多个节点 |
---|---|---|
节点索引 | 标量 示例: | 向量 示例: |
节点名称 | 字符向量 示例: | 字符向量元胞数组 示例: |
字符串标量 示例: | 字符串数组 示例: |
Labels
— 节点标签
字符向量 | 字符串标量 | 字符向量元胞数组 | 字符串数组
节点标签,指定为字符向量或字符向量元胞数组。
如果
Labels
为字符向量或字符串标量,则labelnode
对nodeIDs
指定的每个节点使用该标签。如果
Labels
是元胞数组或字符串数组,则它必须包含nodeIDs
指定的每个节点的标签。
数据类型: char
| cell
| string
版本历史记录
在 R2015b 中推出
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- 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)