| MatArray Toolbox | Search  Help Desk |
| disptree | Examples See Also |
Syntax
disptree(tree) disptree(tree,tag) disptree(tree,tag,options)
Description
The function displays in the command window a scheme of the clusteringtree, typically
obtained with hierarc.
If tag is absent, the leaf labels are set to the
indexes present in tree. If tag is present,
the leaf with the index i will be given the label
tag(i). Use [] as a placeholder if
tag is not needed.
If options is present, an estimate of the distance
at each node is displayed, with 99 being the largest
distance in the tree.
Examples
a=randn(10,10);
tree=hierarc(dl2c(a),1);
disptree(tree)
|
----------------
| |
--------------- 5
| |
------------- 10
| |
--------- -----
| | | |
---- ----- 6 ----
| | | | | |
1 4 2 ---- 9 7
| |
3 8
disptree(tree,(1:10)>5)
|
----------------
| |
--------------- 0
| |
------------- 1
| |
--------- -----
| | | |
---- ----- 1 ----
| | | | | |
0 0 0 ---- 1 1
| |
0 1
disptree(tree,[],1)
99
----------------
94 |
--------------- 5
72 |
------------- 10
51 56
--------- -----
49 38 | 39
---- ----- 6 ----
| | | 26 | |
1 4 2 ---- 9 7
| |
3 8
In this last version, the distances are displayed. This can
be useful as the trees only show the order of the nodes, but
not the distances between the nodes merged.
See Also
clustTV,
dl2c,
hierarc