New in Wolfram
Mathematica
8: Wavelet Analysis
◄
previous
|
next
►
Application Areas
Discrete Wavelet Packet Transform (DWPT)
Perform a
DiscreteWaveletPacketTransform
.
In[1]:=
X
f[t_] := N[ 4/(1 + Exp[-6.4 t + 3.2]) + Cos[100 \[Pi] t] Ii[t, 1/3, 2/3]]; Ii[t_, x1_, x2_] := Piecewise[{{1, t >= x1 && t <= x2}}, 0]
In[2]:=
X
data = Join[Table[f[x], {x, 0, 1, 1/127}], Reverse[Table[f[x], {x, 0, 1, 1/127}]]];
In[3]:=
X
dwpt = DiscreteWaveletPacketTransform[data, Automatic, 2];
In[4]:=
X
Column[{Show[dwpt["TreeView"], ImageSize -> 300, AspectRatio -> 1/GoldenRatio, PlotLabel -> Style["DWPT Decomposition Tree", FontFamily -> "Verdana", Brown, Bold, 16]], WaveletListPlot[dwpt, All, DataRange -> {0, 1}, Joined -> False, ImageSize -> 570, PlotRangePadding -> None, Filling -> Axis, TicksStyle -> Directive[FontFamily -> "Verdana", 12], PlotMarkers -> "", PlotLabel -> Style["Wavelet Decomposition Plot", FontFamily -> "Verdana", Brown, Bold, 16], Method -> {"PlotData" -> True}, Ticks -> Full, PlotStyle -> (Directive[{Opacity[1], Thickness@0.003, #}] & /@ Append[ConstantArray[ColorData[14][5], 6], ColorData[14][6]]) ]}, Alignment -> Center]
Out[4]=