# wpjoin

Recompose wavelet packet

## Syntax

``T = wpjoin(T,n)``
``[T,C] = wpjoin(T,n)``

## Description

`wpjoin` is a one- and two-dimensional wavelet packet analysis function.

example

````T = wpjoin(T,n)` returns the modified wavelet packet tree `T` corresponding to a recomposition of the node `n`. The function updates the wavelet packet tree after the recomposition of the node.The nodes are numbered from left to right and from top to bottom. The root index is 0.`wpjoin(T,0)` is equivalent to `wpjoin(T)`.```
````[T,C] = wpjoin(T,n)` also returns the coefficients of the node.```

## Examples

collapse all

`load noisdopp`

Obtain the wavelet packet tree that corresponds to the wavelet packet decomposition of the signal at level 3 using the `db1` wavelet. Plot the tree.

```wpt = wpdec(noisdopp,3,"db1"); plot(wpt)```

Recompose the tree node at depth-position `(1,1)`. Plot the modified tree.

```wpt = wpjoin(wpt,[1 1]); plot(wpt)```

## Input Arguments

collapse all

Wavelet packet tree, specified as a `wptree` object.

Example: `T = wpdec(randn(1,1000),3,"db1")`

Tree node, specified as a nonnegative integer or a 1-by-2 vector. You can specify the node by either its index or depth and position.

Data Types: `double`

## Output Arguments

collapse all

Wavelet packet tree coefficients at a node, returned as a vector, matrix, or 3-D array.

## Version History

Introduced before R2006a