Plot tree GUI
plot is a graphical
The figure that contains the tree is a GUI tool. It lets you change the Node Label to Depth_Position or Index, and Node Action to Split-Merge or Visualize.
The default values are Depth_Position and Visualize.
You can click the nodes to execute the current Node Action.
T in the figure whose handle is
This figure was already used to plot a tree, for example using the
FIG = plot(T)
After some split or merge actions, you can get the new tree using its parent figure handle. The following syntax lets you perform this functionality:
NEWT = plot(T,'read',FIG)
In fact, the first argument is dummy. The most general syntax is
NEWT = plot(DUMMY,'read',FIG)
DUMMY is any object parented by an
NTREE object. More generally,
DUMMY can be any
object constructor name returning an NTREE parented object. For example:
NEWT = plot(ntree,'read',FIG) NEWT = plot(dtree,'read',FIG) NEWT = plot(wptree,'read',FIG)
% Create a wavelet packets tree (1-D) load noisbloc x = noisbloc; t = wpdec(x,2,'db2'); % Plot tree t. plot(t)
% Change Node Label from Depth_Position to Index.
% Click the node (3). You get the following figure.
Now set the Node Label back to Depth_Position.
Change Node Action to Split-Merge.
Click on the
The above figure now shows the discrete wavelet transform down to level 2.
% Create a wavelet packets tree (2-D) load woman2 t = wpdec2(X,1,'sym4'); % Plot tree t. plot(t) % Change Node Label from Depth_Position to Index. % Click the node (1). You get the following figure.