Documentation 
Inverse continuous wavelet transform (CWT) for linearly spaced scales
xrec = icwtlin(cwtstruct)
xrec = icwtlin(wav,meanSIG,cfs,scales,dt)
xrec = icwtin(...,'plot')
xrec = icwtlin (...,'signal',SIG,'plot')
xrec = icwtlin(...,Name,Value)
xrec = icwtlin(cwtstruct) returns the inverse continuous wavelet transform (CWT) of the CWT coefficients obtained at linearlyspaced scales.
Note: To use icwtlin you must:

xrec = icwtlin(wav,meanSIG,cfs,scales,dt) returns the inverse CWT of the coefficients in cfs. The inverse CWT is obtained using the wavelet wav, the linearly spaced scales scales, the sampling period dt, and the mean signal value meanSig.
xrec = icwtin(...,'plot') plots the reconstructed signal xrec along with the CWT coefficients and CWT moduli. If the analyzing wavelet is complexvalued, the plot includes the real and imaginary parts of the CWT coefficients.
xrec = icwtlin (...,'signal',SIG,'plot') places a radio button in the bottomleft corner of the plot. Enabling the radio button superimposes the plot of the input signal SIG on the plot of the reconstructed signal. SIG can be a structure array, a cell array, or a vector. If SIG is a structure array, there must be two fields: val and period. The val field contains the signal and the period field contains the sampling period. If SIG is a cell array, SIG{1} contains the signal and SIG{2} is the sampling period.
xrec = icwtlin(...,Name,Value) returns the inverse CWT transform with additional options specified by one or more Name,Value pair arguments.
cwtstruct 
A structure array that is the output of cwtft or constructed from the output of cwt. If you obtain cwtstruct from cwtft, the structure array contains six fields:
If you create cwtstruct from the output of cwt, cwtstruct contains all of the preceding fields except omega. Using cwt to obtain the CWT coefficients, the valid analyzing wavelets are:

'IdxSc' 
Vector of scales to use in the signal reconstruction. Specifying a subset of scales results in a scalelocalized approximation of the analyzed signal. 
Compute the inverse CWT of a sum of sine waves with disjoint support.
% Define the signal N = 100; t = linspace(0,1,N); Y = sin(8*pi*t).*(t<=0.5) + sin(16*pi*t).*(t>0.5) ; % Define parameters before analysis dt = 0.001; maxsca = 1; s0 = 2*dt; ds = 2*dt; scales = s0:ds:maxsca; wname = 'morl'; SIG = {Y,dt}; WAV = {wname,[]}; % Compute the CWT using cwtft with linear scales cwtS = cwtft(SIG,'scales',scales,'wavelet',WAV); % Compute inverse CWT using linear scales Yrec = icwtlin(cwtS,'Signal',Y,'plot');
Reconstruct an approximation to a noisy Doppler signal based on thresholded coefficients. Use the universal threshold. Assume the sampling period is 0.05 seconds.
load noisdopp; Y = noisdopp; N = length(Y); % Define parameters before analysis % Assume sampling period is 0.05 dt = 0.05; maxsca = 100; s0 = 2*dt; ds = 4*dt; scales = s0:ds:maxsca; wname = 'morl'; SIG = {Y,dt}; WAV = {wname,[]}; % Compute CWT cwtS = cwtft(SIG,'scales',scales,'wavelet',WAV,'plot'); % Select subset of coefficients cwtS1 = cwtS; Hfreq = cwtS.cfs(1:10,:); % Set threshold thr = sqrt(2*log(N))*median(abs(Hfreq(:)))/0.6745; newCFS = cwtS.cfs; % Set coefficients smaller than threshold in absolute value to 0 newCFS(abs(newCFS)<thr) = 0; cwtS1.cfs = newCFS; % Reconstruction from the modified structure YRDen = icwtlin(cwtS1,'signal',Y,'plot');
Enable the Reconstructed Signal On/Off radio button in the bottomleft corner.
[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.