Inverse CWT
This function is no longer recommended. Use icwt
instead.
xrec = icwtft(cwtstruct)
xrec = icwtft(cwtstruct,'plot')
xrec = icwtft(cwtstruct,'signal',SIG,'plot')
returns
the inverse continuous wavelet transform of the CWT coefficients contained
in the xrec
= icwtft(cwtstruct
)cfs
field of the structure array cwtstruct
.
Obtain the structure array cwtstruct
as the output
of cwtft
.
plots
the reconstructed signal.xrec
= icwtft(cwtstruct
,'plot')
places
a radio button in the bottom left corner of the plot. Enabling the
radio button superimposes the plot of the input signal xrec
= icwtft(cwtstruct
,'signal',SIG,'plot')SIG
on
the plot of the reconstructed signal. By default the radio button
is not enabled and only the reconstructed signal is plotted.

Structure array containing six fields.


Reconstructed signal 
Compute the CWT and inverse CWT of two sinusoids with disjoint support.
N = 1024; t = linspace(0,1,N); y = sin(2*pi*8*t).*(t<=0.5)+sin(2*pi*16*t).*(t>0.5); dt = 0.05; s0 = 2*dt; ds = 0.4875; NbSc = 20; wname = 'morl'; sig = {y,dt}; sca = {s0,ds,NbSc}; wave = {wname,[]}; cwtsig = cwtft(sig,'scales',sca,'wavelet',wave); % Compute inverse CWT and plot reconstructed signal with original sigrec = icwtft(cwtsig,'signal',sig,'plot');
Select the radio button in the bottom left corner of the plot.
Use the inverse CWT to approximate a trend in a time series.
Construct a time series consisting of a polynomial trend, a sinewave
(oscillatory component), and additive white Gaussian noise. Obtain
the CWT of the input signal and use the inverse CWT based on only
the coarsest scales to reconstruct an approximation to the trend.
To obtain an accurate approximation based on select scales use the
default power of two spacing for the scales in the continuous wavelet
transform. See cwtft
for details.
t = linspace(0,1,1e3); % Polynomial trend x = t.^3t.^2; % Periodic term x1 = 0.25*cos(2*pi*250*t); % Reset random number generator for reproducible results rng default y = x+x1+0.1*randn(size(t)); % Obtain CWT of input time series cwty = cwtft({y,0.001},'wavelet','morl'); % Zero out all but the coarsest scale CWT coefficients cwty.cfs(1:16,:) = 0; % Reconstruct a signal approximation based on the coarsest scales xrec = icwtft(cwty); plot(t,y,'k'); hold on; xlabel('Seconds'); ylabel('Amplitude'); plot(t,x,'b','linewidth',2); plot(t,xrec,'r','linewidth',2); legend('Original Signal','Polynomial Trend',... 'Inverse CWT Approximation'); figure plot(t,x,'b'); hold on; xlabel('Seconds'); ylabel('Amplitude'); plot(t,xrec,'r','linewidth',2); legend('Polynomial Trend','Inverse CWT Approximation');
You can also use the following syntax to plot the approximation. Select the radio button to view the original polynomial trend superimposed on the wavelet approximation.
% Input the polynomial trend as the value of 'signal' xrec = icwtft(cwty,'signal',x,'plot');
[1] Daubechies, I. Ten Lectures on Wavelets, Philadelphia, PA: Society for Industrial and Applied Mathematics (SIAM), 1992.
[2] Farge, M. “Wavelet Transforms and Their Application to Turbulence”, Ann. Rev. Fluid. Mech., 1992, 24, 395–457.
[3] Mallat, S. A Wavelet Tour of Signal Processing, San Diego, CA: Academic Press, 1998.
[4] Sun,W. “Convergence of Morlet's Reconstruction Formula”, preprint, 2010.
[5] Torrence, C. and G.P. Compo “A Practical Guide to Wavelet Analysis”, Bull. Am. Meteorol. Soc., 79, 61–78, 1998.