Create recombining binomial tree
Tree = mktree(NumLevels, NumPos,
Number of time levels of the tree.
1-by-NUMLEVELS vector containing the length of the state vectors in each time level.
(Optional) Initial value at each node of the tree. Default = NaN.
(Optional) Boolean determining if a final horizontal branch is added to the tree. Default = 0.
Create a recombining tree of four time levels with a vector of two elements in each node and each element initialized to NaN.
Tree = mktree(4, 2);