# swt

Discrete stationary wavelet transform 1-D

## Syntax

`SWC = swt(X,N,'wname')SWC = swt(X,N,Lo_D,Hi_D)`

## Description

`swt` performs a multilevel 1-D stationary wavelet decomposition using either a specific orthogonal wavelet (`'wname'`, see `wfilters` for more information) or specific orthogonal wavelet decomposition filters.

`SWC = swt(X,N,'wname')` computes the stationary wavelet decomposition of the signal `X` at level `N`, using `'wname'`.

`N` must be a strictly positive integer (see `wmaxlev` for more information) and `length(X)` must be a multiple of 2N .

`SWC = swt(X,N,Lo_D,Hi_D)` computes the stationary wavelet decomposition as above, given these filters as input:

• `Lo_D` is the decomposition low-pass filter.

• `Hi_D` is the decomposition high-pass filter.

`Lo_D` and `Hi_D` must be the same length.

The output matrix `SWC` contains the vectors of coefficients stored row-wise:

For `1 `` i ``N`, the output matrix `SWC(i,:)` contains the detail coefficients of level `i` and `SWC(N+1,:)` contains the approximation coefficients of level `N`.

`[SWA,SWD] = swt( )` computes approximations, `SWA`, and details, `SWD`, stationary wavelet coefficients.

The vectors of coefficients are stored row-wise:

For `1 `` i ``N`, the output matrix `SWA(i,:)` contains the approximation coefficients of level `i` and the output matrix `SWD(i,:)` contains the detail coefficients of level `i`.

 Note   `swt` is defined using `dwt` with periodic extension.

## Examples

```% Load original 1D signal. load noisbloc; s = noisbloc; % Perform SWT decomposition at level 3 of s using db1. [swa,swd] = swt(s,3,'db1'); % Plots of SWT coefficients of approximations and details % at levels 3 to 1. % Using some plotting commands, % the following figure is generated. ```

collapse all

### Algorithms

Given a signal s of length N, the first step of the SWT produces, starting from s, two sets of coefficients: approximation coefficients cA1 and detail coefficients cD1. These vectors are obtained by convolving s with the low-pass filter `Lo_D` for approximation, and with the high-pass filter `Hi_D` for detail.

More precisely, the first step is

 Note   cA1 and cD1 are of length `N` instead of `N/2` as in the DWT case.

The next step splits the approximation coefficients cA1 in two parts using the same scheme, but with modified filters obtained by upsampling the filters used for the previous step and replacing s by cA1. Then, the SWT produces cA2 and cD2. More generally,

## References

Nason, G.P.; B.W. Silverman (1995), "The stationary wavelet transform and some statistical applications," Lecture Notes in Statistics, 103, pp. 281–299.

Coifman, R.R.; Donoho, D.L. (1995), "Translation invariant de-noising," Lecture Notes in Statistics, 103, pp. 125–150.

Pesquet, J.C.; H. Krim, H. Carfatan (1996), "Time-invariant orthonormal wavelet representations," IEEE Trans. Sign. Proc., vol. 44, 8, pp. 1964–1970.