Single-level inverse discrete 1-D wavelet transform (periodized).
Syntax
X = idwtper(cA,cD,'wname')
X = idwtper(cA,cD,Lo_R,Hi_R)
X = idwtper(cA,cD,'wname',L)
X = idwtper(cA,cD,Lo_R,Hi_R,L)
Description
idwtper is a one-dimensional wavelet analysis function.
X = idwtper(cA,cD,'wname') returns the single-level reconstructed approximation coefficients vector X based on approximation and detail vectors cA and cD at a given level, using the periodized inverse wavelet transform. 'wname' is a string containing the wavelet name (see wfilters).
Instead of giving the wavelet name, you can give the filters.
For X = idwtper(cA,cD,Lo_R,Hi_R):
Lo_R is the reconstruction low-pass filter.
Hi_R is the reconstruction high-pass filter.
If la = length(cA) = length(cD) then length(X) = 2*la.
For X = idwtper(cA,cD,'wname',L) or X = idwtper(cA,cD,Lo_R,Hi_R,L), L is the length of the result.
idwtper is the inverse function of dwtper in the sense that the abstract statement idwtper(dwtper(X,'wname'),'wname') gets back to X.
Examples
% Set initial signal and get filters.
x = sin(0.3*[1:300]); lx = length(x)
lx =
300
w = 'db9';
[Lo_D,Hi_D,Lo_R,Hi_R] = wfilters(w);
% DWT with zero-padding signal extension.
[cazp,cdzp] = dwt(x,w);
% The transform uses some extra coefficients,
% at most 2 if lx is odd.
lxtzp = 2*length(cazp)
lxtzp =
316
% Reconstruction.
xzp = idwt(cazp,cdzp,w,lx);
% Error with zero-padding.
errzp = max(abs(x-xzp))
errzp =
7.3231e-12
% Periodized DWT.
[cap,cdp] = dwtper(x,w);
% The transform uses a minimum of extra coefficients.
lxtp = 2*length(cap)
lxtp =
300
% Reconstruction.
xp = idwtper(cap,cdp,w,lx);
% Error with periodized DWT.
errp = max(abs(x-xp))
errp =
1.4588e-11
Note: In general, the following abstract statement is not true: idwtper(dwt(X,'wname'),'wname') = X .
See Also
dwtper
[ Previous | Help Desk | Next ]