New in Wolfram
Mathematica
8: Wavelet Analysis
◄
previous
|
next
►
Application Areas
Continuous Wavelet Transform (CWT)
Perform a continuous wavelet transform and visualize the results using scalograms.
In[1]:=
X
cf[x_] := Blend[{RGBColor[0., 0., 0.3], RGBColor[0., 0., 0.5], RGBColor[0, 0.1, 0.5], RGBColor[0, 0.2, 1], RGBColor[0, 0.5, 1], RGBColor[0.2, 0.7, 1], RGBColor[0.5, 0.8, 1], RGBColor[0.5, .9, .9], RGBColor[0.5, 1., 0.9], RGBColor[0.7, 1, 0.7], RGBColor[0.8, 1, 0.5], RGBColor[1, 1, 0], RGBColor[1, 0.8, 0], RGBColor[1, 0.5, 0], RGBColor[1, .25, 0], RGBColor[1, .1, 0.], RGBColor[1, .0, 0.], RGBColor[.9, .0, 0.], RGBColor[0.8, 0., 0.], RGBColor[0.5, 0., 0.], RGBColor[.25, 0., 0.], RGBColor[0.1, 0, 0]}, x];
In[2]:=
X
dd = Table[ Cos[1.2/(0.75 - x)] + Cos[-1.2/(0.25 - x)] + Cos[0.1/(0.5 - x)] + Cos[0.1/(0.1 - x)] + Cos[0.1/(0.9 - x)], {x, 0, 1, 1/2023}];
In[3]:=
X
cwd = ContinuousWaveletTransform[dd, DGaussianWavelet[3], {Automatic, 16}];
In[4]:=
X
Column[{ListLinePlot[dd, Axes -> None, ImageSize -> 570, AspectRatio -> 0.2, PlotRangePadding -> None, Background -> cf[0], PlotStyle -> cf[0.3]], WaveletScalogram[cwd, ColorFunction -> ( cf[#] &), Axes -> None, ImageSize -> 570, PlotRangePadding -> None]}, Spacings -> 0.2]
Out[4]=