New in Wolfram
Mathematica
8: Wavelet Analysis
◄
previous
|
next
►
Application Areas
Visualize Scalograms in Three Dimensions
In[1]:=
X
background = Black; cfunc = ColorData["AvocadoColors"];
In[2]:=
X
data1 = Table[ Piecewise[{{Sin[2 \[Pi] 10 t], 0 <= t < 1/4}, {Sin[2 \[Pi] 25 t], 1/4 <= t < 1/2}, {Sin[2 \[Pi] 50 t], 1/2 <= t < 3/4}, {Sin[2 \[Pi] 100 t], 3/4 <= t <= 1}}], {t, 0, 1, 1/1023}];
In[3]:=
X
cwd1 = ContinuousWaveletTransform[ArrayPad[data1, 8], DGaussianWavelet[5], {Automatic, 12}];
In[4]:=
X
ga1 = WaveletScalogram[cwd1, {2 | 3 | 4 | 5 | 6 | 7 | 8 | 9, _}, ColorFunction -> cfunc, Axes -> None, ImageSize -> 280, Background -> background];
In[5]:=
X
gb1 = ListPlot3D[ Abs[cwd1[{2 | 3 | 4 | 5 | 6 | 7 | 8 | 9, _}, "Values"]], PlotRange -> All, Mesh -> None, ColorFunction -> cfunc, Boxed -> False, ImageSize -> 280, Axes -> False, Background -> background];
In[6]:=
X
d = Re[Zeta[1/2 + I Range[0, 100, 0.01]]];
In[7]:=
X
data2 = Table[Sign[Cos[x^2]], {x, -6, 6, 12./1023}];
In[8]:=
X
cwd2 = ContinuousWaveletTransform[ArrayPad[data2, 8], Automatic, {11, 12}];
In[9]:=
X
ga2 = WaveletScalogram[ cwd2, {2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11, _}, Abs[Re[#1]] &, ColorFunction -> cfunc, Axes -> None, ImageSize -> 280, Background -> background];
In[10]:=
X
gb2 = ListPlot3D[ Abs[Re[cwd2[{2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11, _}, "Values"]]], PlotRange -> All, Mesh -> None, ColorFunction -> cfunc, Boxed -> False, ImageSize -> 280, Axes -> False, Background -> background];
In[11]:=
X
Grid[{{ga1, gb1}, {gb2, ga2}}, Background -> background]
Out[11]=