| Contents | Index |
The following sections explain how to extend the toolbox with new objects through four examples.
This example creates a new class of objects: WTREE.
Starting from the class DTREE and overloading the methods split and merge, we define a wavelet tree class.
To plot a WTREE, the DTREE plot method is used.
You can have a look at a one-dimensional example in the ex1_wt file and at a two-dimensional example in the ex2_wt file located in the toolbox/wavelet/wavedemo folder. These examples can be used directly, but they are also useful to learn how to build new object-oriented programming functions.
The definition of the new class is described below.
Class WTREE (parent class: DTREE)
| dtree | Parent object |
| dwtMode | DWT extension mode |
| wavInfo | Structure (wavelet information) |
| wavName | Wavelet Name |
| Lo_D | Low Decomposition filter |
| Hi_D | High Decomposition filter |
| Lo_R | Low Reconstruction filter |
| Hi_R | High Reconstruction filter |
| wtree | Constructor for the class WTREE. |
| merge | Merge (recompose) the data of a node. |
| split | Split (decompose) the data of a terminal node. |
This example creates a new class of objects: RWVTREE.
We define a right wavelet tree class starting from the class WTREE and overloading the methods split, merge, and plot (inherited from DTREE).
The plot method shows how to add Node Labels.
You can have a look at a one-dimensional example in the ex1_rwvt file and at a two-dimensional example in the ex2_rwvt file located in the toolbox/wavelet/wavedemo folder. These programs can be used directly, but they are also useful to learn how to build new object-oriented programming functions.
The definition of the new class is described below.
Class RWVTREE (parent class: WTREE)
| dummy | Not used |
| wtree | Parent object |
| rwvtree | Constructor for the class RWVTREE. |
| merge | Merge (recompose) the data of a node. |
| plot | Plot RWVTREE object. |
| split | Split (decompose) the data of a terminal node. |
The following figure is obtained using the example ex1_rwvt and clicking the node 14.
The approximations are labeled in yellow and the details are labeled in red. The last nodes cannot be split.

This example creates a new class of objects: WVTREE.
We define a wavelet tree class starting from the class WTREE and overloading the methods get, plot, and recons (all inherited from DTREE).
The split and merge methods of the class WTREE are used.
The plot method shows how to add Node Labels and Node Actions.
You can have a look at a one-dimensional example in the ex1_wvt file and at a two-dimensional example in the ex2_wvt file located in the toolbox/wavelet/wavedemo folder. These programs can be used directly, but they are also useful to learn how to build new object-oriented programming functions.
The definition of the new class is described below.
Class WVTREE (parent class: WTREE)
| dummy | Not used |
| wtree | Parent object |
| wvtree | Constructor for the class WVTREE. |
| get | Get WVTREE object field contents. |
| plot | Plot WVTREE object. |
| recons | Reconstruct node coefficients. |
The following figure is obtained using the example ex2_wvt and clicking the node 2.
The approximations are labeled in yellow and the details are labeled in red. The last nodes cannot be split. The title of the figure contains the DWT extension mode used ('sym' in the present example).

This example creates a new class of objects: EDWTTREE.
We define an ε-DWT tree class starting from the class DTREE and overloading the methods merge, plot, recons, and split.
For more information on the ε-DWT, see the section -Decimated DWT.
The plot method shows how to add Node Labels, Node Actions, and Tree Actions.
You can have a look at the example in the ex1_edwt file located in the toolbox/wavelet/wavedemo folder. This program can be used directly, but it is also useful to learn how to build new object-oriented programming functions.
The definition of the new class is described below.
Class EDWTTREE (parent class: DTREE)
| dtree | Parent object |
| dwtMode | DWT extension mode |
| wavInfo | Structure (wavelet information) |
wavInfo
| wavName | Wavelet Name |
| Lo_D | Low Decomposition filter |
| Hi_D | High Decomposition filter |
| Lo_R | Low Reconstruction filter |
| Hi_R | High Reconstruction filter |
| edwttree | Constructor for the class EDWTTREE. |
| merge | Merge (recompose) the data of a node. |
| plot | Plot EDWTTREE object. |
| recons | Reconstruct node coefficients. |
| split | Split (decompose) the data of a terminal node. |
The following figure is obtained using the example ex1_edwt, selecting the De-noise option in the Tree Action menu and clicking the node 0.
The approximations are labeled in yellow and the details are labeled in red. The last nodes cannot be split.
The title of the figure contains the DWT extension mode used ('sym' in the present example) and the name of the de-noising method.

![]() | Detailed Description of Objects in the Wavelet Toolbox Software | Denoising, Nonparametric Function Estimation, and Compression | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |