Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

mkbush

Create bushy tree

Syntax

[Tree, NumStates] = mkbush(NumLevels, NumChild, NumPos, Trim,
NodeVal)

Arguments

NumLevels

Number of time levels of the tree.

NumChild

1-by- number of levels (NUMLEVELS) vector with number of branches (children) of the nodes in each level.

NumPos

1-by-NUMLEVELS vector containing the length of the state vectors in each time level.

Trim

(Optional) Scalar 0 or 1. If Trim = 1, NumPos decreases by 1 when moving from one time level to the next. Otherwise, if Trim = 0 (Default), NumPos does not decrease.

NodeVal

(Optional) Initial value at each node of the tree. Default = NaN.

Description

[Tree, NumStates] = mkbush(NumLevels, NumChild, NumPos, Trim,
NodeVal)
creates a bushy tree Tree with initial values NodeVal at each node. NumStates is a 1-by-NUMLEVELS vector containing the number of state vectors in each level.

Examples

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.

Tree = mkbush(4, 2, 3);
treeviewer(Tree) 

Related Examples

See Also

|

Introduced before R2006a

Was this topic helpful?