This example shows how to create a tree with four time levels, two branches per node, and a vector of three elements in each node with each element initialized to NaN.
NumLevels — Number of time levels of the tree numeric
Number of time levels of the tree, specified as a scalar numeric.
Data Types: double
NumChild — Number of branches (children) of the nodes in each level vector
Number of branches (children) of the nodes in each level, specified as a
1-by- number of levels (NUMLEVELS)
vector.
Data Types: double
NumPos — Length of the state vectors in each time level vector
Length of the state vectors in each time level, specified as a
1-by-NUMLEVELS vector.
Data Types: double
Trim — Indicates movement between nodes 0 (default) | logical
(Optional) Indicates movement between nodes, specified as a scalar
0 or 1. If Trim =
1, NumPos decreases by
1 when moving from one time level to the next.
Otherwise, if Trim = 0, NumPos does
not decrease.
Data Types: logical
NodeVal — Initial value at each node of the tree NaN (default) | numeric
(Optional) Initial value at each node of the tree, specified as a scalar
numeric.
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.