Discrete stationary wavelet transform 1-D
Perform a multilevel stationary wavelet decomposition of a signal.
Load a one-dimensional signal and acquire its length.
load noisbloc s = noisbloc; sLen = length(s);
Perform a stationary wavelet decomposition at level 3 of the signal using
'db1'. Extract the detail and approximation coefficients at level 3.
[swa,swd] = swt(s,3,'db1'); swd3 = swd(3,:); swa3 = swa(3,:);
Plot the output of the decomposition.
plot(s) xlim([0 sLen]) title('Original Signal')
Plot the level 3 approximation and detail coefficients.
subplot(2,1,1) plot(swa3) xlim([0 sLen]) title('Level 3 Approximation coefficients') subplot(2,1,2) plot(swd3) xlim([0 sLen]) title('Level 3 Detail coefficients')
x— Input signal
Input signal, specified as a real-valued vector.
wname— Analyzing wavelet
Analyzing wavelet, specified as a character vector or string scalar.
swt supports only Type 1 (orthogonal) or Type 2
(biorthogonal) wavelets. See
wfilters for a list of
orthogonal and biorthogonal wavelets.
LoD,HiD— Wavelet decomposition filters
Wavelet decomposition filters, specified as a pair of even-length
LoD is the lowpass decomposition
HiD is the highpass decomposition filter. The
HiD must be equal.
wfilters for additional
swc— Stationary wavelet decomposition
Stationary wavelet decomposition, returned as a real-valued matrix. The coefficients are stored row-wise:
For 1 ≤ i ≤
ith row of
contains the detail coefficients of level
the approximation coefficients of level
swa— Approximation coefficients
Approximation coefficients, returned as a real-valued matrix. For 1 ≤
ith row of
swa contains the
approximation coefficients of level i.
swd— Detail coefficients
Detail coefficients, returned as a real-valued matrix. For 1 ≤
ith row of
swd contains the detail
coefficients of level i.
Given a signal s of length N, the first step of
the stationary wavelet transform (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 lowpass filter
approximation, and with the highpass filter
HiD for detail.
More precisely, the first step is
where denotes convolution with the filter X.
cD1 are of length
N instead of
N/2 as in the DWT
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,
F0 = LoD
G0 = HiD
— Upsample (insert zeros between elements)
 Nason, G. P., and B. W. Silverman. “The Stationary Wavelet Transform and Some Statistical Applications.” In Wavelets and Statistics, edited by Anestis Antoniadis and Georges Oppenheim, 103:281–99. New York, NY: Springer New York, 1995. https://doi.org/10.1007/978-1-4612-2544-7_17.
 Coifman, R. R., and D. L. Donoho. “Translation-Invariant De-Noising.” In Wavelets and Statistics, edited by Anestis Antoniadis and Georges Oppenheim, 103:125–50. New York, NY: Springer New York, 1995. https://doi.org/10.1007/978-1-4612-2544-7_9.
 Pesquet, J.-C., H. Krim, and H. Carfantan. “Time-Invariant Orthonormal Wavelet Representations.” IEEE Transactions on Signal Processing 44, no. 8 (August 1996): 1964–70. https://doi.org/10.1109/78.533717.
Usage notes and limitations:
wname must be constant.
The level of decomposition
n must be defined as a
scalar during compilation.