WOLFRAM 语言兼容性信息

升级:

WaveletExplorer

Mathematica 8 中,Wavelet Explorer 附加程序包的功能已被集成到 Mathematica 内核.

小波滤波器

以下是在 Wavelet Explorer 中可用的滤波器列表,以及其在 Mathematica 8 中相对应的格式.

HaarFilter[]WaveletFilterCoefficients[HaarWavelet[]]
DaubechiesFilter[n]WaveletFilterCoefficients[DaubechiesWavelet[n]]
LeastAsymmetricFilter[n]WaveletFilterCoefficients[SymletWavelet[n]]
CoifletFilter[n]WaveletFilterCoefficients[CoifletWavelet[n]]
ShannonFilter[lim]WaveletFilterCoefficients[ShannonWavelet[lim]]
MeyerFilter[n,lim]WaveletFilterCoefficients[MeyerWavelet[n,lim]]
SplineFilter[n,lim]WaveletFilterCoefficients[BattleLemarieWavelet[n,lim]]
BiorthogonalSplineFilter[n,m]WaveletFilterCoefficients[BiorthogonalSplineWavelet[n,m]]
HighpassFilter[h]WaveletFilterCoefficients[wave,"PrimalHighpass"]
等价的内置函数.

使用内置函数 WaveletFilterCoefficients 计算小波系数:

Wavelet Explorer Needs["Wavelets`Wavelets`"]
DaubechiesFilter[2]
In[14]:=
Click for copyable input
Out[14]=

请注意,相对于 Wavelet Explorer 的结果,所有小波系数均被缩放了,因此,要获得相等的结果,您必须把结果乘以

In[13]:=
Click for copyable input
Out[13]=

计算高通滤波系数,使用 WaveletFilterCoefficients 参数:

Wavelet Explorer Needs["Wavelets`Wavelets`"]
HighpassFilter[DaubechiesFilter[2]]
In[2]:=
Click for copyable input
Out[2]=

尺度和小波函数

以下是在 Wavelet Explorer 中可用的滤波器列表,以及其在 Mathematica 8 中相对应的格式.

ScalingFunction[filt,j]WaveletPhi[wave]
Wavelet[wave,j]WaveletPsi[wave]
ShannonPhi[t]WaveletPhi[ShannonWavelet[lim],t]
ShannonPsi[t]WaveletPsi[ShannonWavelet[lim],t]
MeyerPhi[n,t,lim]WaveletPhi[MeyerWavelet[n,lim],t]
MeyerPsi[n,t,lim]WaveletPsi[MeyerWavelet[n,lim],t]
SplinePhi[n,t,lim]WaveletPhi[BattleLemarieWavelet[n,lim],t]
SplinePsi[n,t,lim]WaveletPsi[BattleLemarieWavelet[n,lim],t]
BSpline[n,t]BSplineBasis[{n,{u1,u2,}},0,t]
DScalingFunction[filt,jmax,m]Dt[WaveletPhi[wave,t],{t,m}]
DWavelet[filt,jmax,m]Dt[WaveletPsi[wave,t],{t,m}]
等价的内置函数.

的功能可以用 WaveletPhi 实现:

Wavelet Explorer Needs["Wavelets`Wavelets`"]
ListLinePlot[ScalingFunction[DaubechiesFilter[2], 8]]
In[17]:=
Click for copyable input
Out[17]=

使用 DtWaveletPhi 求尺度函数的导数:

Wavelet Explorer Needs["Wavelets`Wavelets`"]
ListLinePlot[DScalingFunction[DaubechiesFilter[6], 8, 1]]
In[2]:=
Click for copyable input
Out[2]=

的功能可用 DtWaveletPsi 实现:

Wavelet Explorer Needs["Wavelets`Wavelets`"]
ListLinePlot[DWavelet[LeastAsymmetricFilter[10], 8, 1]]
In[2]:=
Click for copyable input
Out[2]=

计算尺度和小波函数的高阶导数:

In[1]:=
Click for copyable input

WaveletPhiWaveletPsi 输出的 InterpolatingFunctionInterpolationOrder 设为 . 因此第二个导数为0.

In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=

用更高阶的 InterpolationOrder 进行重采样和内插可以解决这个问题:

Wavelet Explorer Needs["Wavelets`Wavelets`"]
ListLinePlot[DWavelet[LeastAsymmetricFilter[10], 7, 2]]
In[5]:=
Click for copyable input
Out[5]=
In[6]:=
Click for copyable input
Out[6]=

的功能可以用内置函数 BSplineBasis 实现:

Wavelet Explorer Needs["Wavelets`Wavelets`"]
Plot[Evaluate[BSpline[6, t]], {t, -3, 4}]
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=

小波变换

以下是在 Wavelet Explorer 中可用的滤波器列表,以及其在 Mathematica 8 中相对应的格式.

WaveletTransform[data,filt,j]DiscreteWaveletTransform[data,wave,j]
InverseWaveletTransform[wd,filt]InverseWaveletTransform[dwd]
WaveletPacketCoefficients[data,filt,j]DiscreteWaveletPacketTransform[data,filt,j]
WaveletPacketTransform[data,filt,l]WaveletBestBasis[DiscreteWaveletPacketTransform[]]
InverseWaveletPacketTransform[wpdata,filt]InverseWaveletTransform[dwd]
等价的内置函数. 函数 不能由内置函数直接支持.

功能可用 DiscreteWaveletTransform 实现:

Wavelet Explorer Needs["Wavelets`Wavelets`"]
Simplify[WaveletTransform[Range[4], HaarFilter[]]]
In[18]:=
Click for copyable input
Out[18]=

使用 DiscreteWaveletPacketTransform 计算包变换:

Wavelet Explorer Needs["Wavelets`Wavelets`"]
wd = WaveletPacketTransform[Range[8], DaubechiesFilter[2], 2]
In[2]:=
Click for copyable input
Out[2]=

使用 InverseWaveletTransform 计算逆:

Wavelet Explorer InverseWaveletPacketTransform[wd, DaubechiesFilter[2]]
In[4]:=
Click for copyable input
Out[4]=

的功能可以编写如下:

Wavelet Explorer Needs["Wavelets`Wavelets`"]
wd  = WaveletTransform[N@Range[8], HaarFilter[]];
MRDecomposition[wd, HaarFilter[]]
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]=

正弦和余弦变换

以下是在 Wavelet Explorer 中可用的滤波器列表,以及其在 Mathematica 8 中相对应的格式.

CosTransform[data,n, BasisType->m]FourierDCT[data,m]
SinTransform[data,n,BasisType->m]FourierDST[data,m]
InverseCosTransform[cdata]FourierDCT[cdata,m]
InverseSinTransform[sdata]FourierDST[sdata,m]
等价的内置函数. 函数 , 不能直接由内置函数支持.

使用内置函数 FourierDST 计算

Wavelet Explorer Needs["Wavelets`Wavelets`"]
SinTransform[Range[8], Taper -> False]
In[10]:=
Click for copyable input
Out[10]=

具有指定的第二变量的

Wavelet Explorer Needs["Wavelets`Wavelets`"]
SinTransform[Range[8], 2, Taper -> False]
In[2]:=
Click for copyable input
Out[2]=

的一维功能可以编写如下:

Wavelet Explorer Needs["Wavelets`Wavelets`"]
SinPacketCoefficients[Range[8], 8, 3, Taper -> False]
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=

同样我们可以用 FourierDCT 编写

Wavelet Explorer Needs["Wavelets`Wavelets`"]
CosPacketCoefficients[Range[8], 8, 3, Taper -> False]
In[5]:=
Click for copyable input
In[6]:=
Click for copyable input
Out[6]=

其它应用

以下是在 Wavelet Explorer 中可用的滤波器列表,以及其在 Mathematica 8 中相对应的格式.

PlotCoefficients[wd]WaveletListPlot[dwd]
PhaseSpacePlot[wd]WaveletScalogram[dwd]
ShowBasisPosition[wd]DiscreteWaveletData[]["BestBasisBlockView"]
PlotCoefficients2D[wd]WaveletMatrixPlot[dwd]
ShowBasisPosition2D[wd]DiscreteWaveletData[]["BestBasisBlockView"]
WaveletCompress[wd,]WaveletThreshold[dwd,tspec]
等价的内置函数. 函数 不能直接由内置函数支持.

使用 WaveletScalogram 绘制小波系数:

Wavelet Explorer Needs["Wavelets`Wavelets`"]
data = Table[Sin[x^3], {x, -6, 6, 12/1023}];
wd = WaveletPacketTransform[data, N@HaarFilter[], 2]
PhaseSpacePlot[wd, Frame -> True, FrameTicks -> None, 
 AspectRatio -> 1/2]
In[30]:=
Click for copyable input
Out[30]=
In[33]:=
Click for copyable input
Out[33]=

对数据压缩使用 WaveletThreshold

Wavelet Explorer Needs["Wavelets`Wavelets`"]
wd = WaveletTransform[Range[8], N@HaarFilter[], 3]
Reverse@WaveletCompress[wd, 4]
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]=

函数 可以编写如下:

Wavelet Explorer Needs["Wavelets`Wavelets`"]
wd = WaveletTransform[N@Range[8], HaarFilter[]];
CumulativeEnergy[wd]
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
In[4]:=
Click for copyable input
Out[4]=
In[5]:=
Click for copyable input
Out[5]=