MATLAB 帮助中心
NTREE manager
wtreemgr(option,T,varargin)
wtreemgr(option,T,varargin) returns information on the tree T depending on the value of option. Use varargin to specify additional input arguments associated with the specified option.
option
T
varargin
example
collapse all
wtreemgr
Create a binary tree (a tree of order 2) of depth 3. Plot the tree.
t = ntree(2,3); fig = plot(t);
Programmatically, in Node Label, change the selected item from Depth_Position to Index.
Depth_Position
Index
plot(t,"setNodeLabel",fig,"Index")
Use wtreemgr to find all the descendents of the node at index 2.
wtreemgr("nodedesc",t,2)
ans = 7×1 2 5 6 11 12 13 14
"allnodes"
"isnode"
"istnode"
Tree parameter, specified as one of these:
allnodes
isnode
istnode
"nodeasc"
nodeasc
"nodedesc"
nodedesc
"nodepar"
nodepar
"ntnode"
ntnode
"tnodes"
tnodes
"leaves"
leaves
"noleaves"
noleaves
"order"
treeord
"depth"
treedpth
ntree
dtree
wptree
Tree, specified as a ntree, dtree, or wptree object.
Introduced before R2006a
allnodes | istnode | leaves | nodeasc | nodedesc | nodepar | noleaves | ntnode | treedpth | treeord
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 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处