New in Wolfram
Mathematica
8: Wavelet Analysis
◄
previous
|
next
►
Application Areas
Compute Wavelet Best Basis
Compute a best basis for a packet transform.
In[1]:=
X
SeedRandom[2]; dwd = DiscreteWaveletPacketTransform[RandomReal[10, 16]];
In[2]:=
X
bestBasisMethod = {"ShannonEntropy", "Norm", "LogEnergy", {"Threshold", 2}};
In[3]:=
X
basisPlot = Table[{Show[WaveletBestBasis[dwd, c]["BestBasisBlockView"], ImageSize -> 280], Magnify[Show[WaveletBestBasis[dwd, c][{"TreeView", Center}], AspectRatio -> 1, ImageSize -> 500], 0.55]}, {c, bestBasisMethod}];
In[4]:=
X
ShowBestBasis[name_, info_] := Framed[Column[{Style[name, 14, Bold, FontFamily -> "Helvetica"], Grid[{info}, Spacings -> {0, 0}]}, Alignment -> Center], RoundingRadius -> 50, FrameStyle -> None, Background -> GrayLevel@0.90]
In[5]:=
X
Column[MapThread[ShowBestBasis, {bestBasisMethod, basisPlot}]]
Out[5]=