This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.


DTREE constructor


T = dtree(ORD,D,X)
T = dtree(ORD,D,X,U)
[T,NB] = dtree(...)
[T,NB] = dtree('PropName1',PropValue1,'PropName2',PropValue2,...)


T = dtree(ORD,D,X) returns a complete data tree (DTREE) object of order ORD and depth D. The data associated with the tree T is X.

With T = dtree(ORD,D,X,U) you can set a user data field.

[T,NB] = dtree(...) returns also the number of terminal nodes (leaves) of T.

[T,NB] = dtree('PropName1',PropValue1,'PropName2',PropValue2,...) is the most general syntax to construct a DTREE object.

The valid choices for 'PropName' are


Order of the tree


Depth of the tree


Data associated to the tree


Split scheme for nodes


User data field

The split scheme field is an order ORD by 1 logical array. The root of the tree can be split and it has ORD children. If spsch(j) = 1, you can split the j-th child. Each node that you can split has the same property as the root node.

For more information on object fields, type help dtree/get.

Class DTREE (Parent class: NTREE)



Parent object


All nodes information


Terminal nodes information


% Create a data tree.
x = [1:10];
t = dtree(3,2,x);
t = nodejoin(t,2);

See Also


Introduced before R2006a

Was this topic helpful?