メインコンテンツ

treedpth

    説明

    treedpth はツリー管理ユーティリティです。

    d = treedpth(t) は、ツリー t の深さ d を返します。

    すべて折りたたむ

    次数 2 のツリーは "二分木" です。深さ 3 の二分木を作成します。ツリーをプロットします。

    order = 2;
    depth = 3;
    t = ntree(order,depth);
    plot(t)

    Figure contains an axes object and an object of type uimenu. The axes object with title Tree Decomposition contains 29 objects of type line, text.

    関数 treedpth を使用して、ツリーの深さが 3 であることを確認します。

    treedpth(t)
    ans = 
    3
    

    入力引数

    すべて折りたたむ

    ツリー。ntree オブジェクト、dtree オブジェクト、または wptree オブジェクトとして指定します。

    バージョン履歴

    R2006a より前に導入

    参考