Main Content

このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。

treedpth

ツリーの深さ

構文

D = treedpth(T)

説明

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

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

% Create binary tree (tree of order 2) of depth 3. 
t = ntree(2,3);

% Plot tree t. 
plot(t)

% Tree depth. 
treedpth(t)

ans =
    3

バージョン履歴

R2006a より前に導入

参考