f = nodepar(t,n)
returns a vector that contains the indices of the "parent(s)" of the nodes
n in the tree t. In the tree, nodes
are numbered from left to right and from top to bottom. The root index is 0.
t — Tree ntree object | dtree object | wptree object
Tree, specified as an ntree, dtree,
or wptree object.
n — Tree nodes column vector | two-column matrix
Tree nodes, specified as a column vector that contains indices of the
nodes or a matrix that contains the depths and positions of the nodes. If
specified as a matrix, n(i,1) and
n(i,2) are the depth and
position, respectively, of the ith node.
Tree nodes, returned as a column vector or matrix. If
f is a vector, f contains node indices. If
f is matrix,
f(i,1) and
f(i,2) are the depth and
position, respectively, of the ith node.
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.