upwlev
Single-level reconstruction of 1-D wavelet decomposition
Description
Examples
Single-Level Reconstruction of 1-D Wavelet Decomposition
Load a 1-D signal.
load sumsin s = sumsin; plot(s) title("Signal")
Save the current DWT extension mode. Set the DWT extension mode to zero-padding.
origmode = dwtmode("status","nodisplay"); dwtmode("zpd","nodisp")
Perform a wavelet decomposition of the signal at level 3 using the db1
wavelet. The wavelet decomposition c
contains the approximation coefficients at level 3, and the detail coefficients at levels 3, 2, and 1.
[c,l] = wavedec(s,3,"db1");
Perform a single-level reconstruction of the wavelet decomposition structure [c,l]
, so the new structure [nc,nl]
is the wavelet decomposition structure at level 2. The wavelet decomposition nc
contains the approximation coefficients at level 2, and the detail coefficients at levels 2 and 1. Plot both wavelet decompositions.
[nc,nl] = upwlev(c,l,"db1"); figure subplot(2,1,1) plot(c) title("Wavelet Decomposition, Level 3") subplot(2,1,2) plot(nc) title("Wavelet Decomposition, Level 2")
Restore the original extension mode.
dwtmode(origmode,"nodisplay")
Input Arguments
c
— Wavelet decomposition
vector
LoR,HiR
— Wavelet reconstruction filters
even-length real-valued vectors
Wavelet reconstruction filters, specified as a pair of
even-length real-valued vectors.
LoR
is the lowpass
reconstruction filter, and HiR
is
the highpass reconstruction filter.
LoR
and HiR
must correspond to the wavelet used to obtain the
original wavelet decomposition structure
[
.
The lengths of c
,l
]LoR
and
HiR
must be equal. See
wfilters
for additional
information.
Data Types: single
| double
Output Arguments
nc
— Wavelet decomposition
vector
Wavelet decomposition, returned as a vector. The
vector contains the wavelet coefficients.
[c,l]
is a wavelet
decomposition at level n =
length(l)-2
, so
[nc,nl]
is the same
decomposition at level n-1
. The
bookkeeping vector nl
contains
the number of coefficients by level and the signal
length.
Data Types: single
| double
Complex Number Support: Yes
nl
— Bookkeeping vector
vector
Bookkeeping vector, returned as a vector of positive
integers. The bookkeeping vector is used to parse
the coefficients in the wavelet decomposition
nc
by level.
Data Types: single
| double
ca
— Approximation coefficients
vector
Approximation coefficients at level
n
, where n =
length(l)-2
, returned as a
vector.
Data Types: single
| double
Complex Number Support: Yes
Version History
Introduced before R2006a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)