matlab cwt morl,Inverse CWT

icwtft

This function is no longer recommended. Use icwt

instead.

Syntax

xrec = icwtft(cwtstruct)

xrec = icwtft(cwtstruct,'plot')

xrec = icwtft(cwtstruct,'signal',SIG,'plot')

Description

cfs field of the

structure array cwtstruct. Obtain the structure

array cwtstruct as the output of cwtft.

xrec = icwtft(cwtstruct,'plot')

plots the reconstructed signal.

xrec = icwtft(cwtstruct,'signal',SIG,'plot')

places a check box in the bottom left corner of the plot. Enabling the

check box superimposes the plot of the input signal

SIG on the plot of the reconstructed

signal. By default the check box is not enabled and only the

reconstructed signal is plotted.

Input ArgumentscwtstructStructure array containing six fields.

cfs — CWT

coefficient matrix

scales — Vector of

scales

frequencies —

frequencies in cycles per unit time (or space)

corresponding to the scales. If the sampling

period units are seconds, the frequencies are in

hertz. The elements of frequencies are in

decreasing order to correspond to the elements in

the scales vector.

omega — Angular

frequencies used in the Fourier transform

meanSig — Mean of

the analyzed signal

dt — The sampling

period

wav — Analyzing

wavelet used in the CWT with parameters

specified

cwtstruct is

the output of cwtft.

Output ArgumentsxrecReconstructed signal

Examples

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 check box in the bottom left corner of the

plot.

5e346342021f754b2992069879190595.png

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.^3-t.^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',{'bump',[4 0.7]});

% Zero out all but the nine coarsest scale CWT coefficients

cwty.cfs(1:80,:) = 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');

994aebc4191f49f25fb94672af1dd22f.png

d302fa0d8978c729c5bc1bda12860eaa.png

You can also use the following syntax to plot the approximation.

Select the box 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');

ff0f9fae4dded55d9651872cb20d7d09.png

More About

Inverse CWT

icwtft computes the inverse CWT based on a

discretized version of the single integral formula due to

Morlet. The Wavelet Toolbox™ Getting Started Guide contains a brief

description of the theoretical foundation for the single

integral formula in Inverse Continuous Wavelet Transform. The

discretized version of this integral is presented in [5]

References

[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.

Introduced in R2011a

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值