represents a Coiflet wavelet of order 2.
represents a Coiflet wavelet of order n.
CoifletWavelet
represents a Coiflet wavelet of order 2.
represents a Coiflet wavelet of order n.
Details
- CoifletWavelet defines a family of orthogonal wavelets.
- CoifletWavelet[n] is defined for positive integers n between 1 and 5.
- The scaling function (
) and wavelet function (
) have compact support of length
. The scaling function has
vanishing moments and wavelet function has
vanishing moments. - CoifletWavelet can be used with such functions as DiscreteWaveletTransform, WaveletPhi, WaveletPsi, etc.
Examples
open all close allBasic Examples (3)
Plot[WaveletPhi[CoifletWavelet[1], x], {x, -2, 3}, PlotRange -> All]WaveletPhi[CoifletWavelet[1], x]Plot[WaveletPsi[CoifletWavelet[1], x], {x, -2, 3}, PlotRange -> All]WaveletPsi[CoifletWavelet[1], x]WaveletFilterCoefficients[CoifletWavelet[1], {"PrimalLowpass", "PrimalHighpass"}]Scope (12)
Basic Uses (7)
Compute primal lowpass filter coefficients:
WaveletFilterCoefficients[CoifletWavelet[1], "PrimalLowpass"]Primal highpass filter coefficients:
WaveletFilterCoefficients[CoifletWavelet[1], "PrimalHighpass"]WaveletFilterCoefficients[CoifletWavelet[2], "LiftingFilter"]%[{"LiftingMatrixForm", z}]Generate a function to compute a lifting wavelet transform:
lf = WaveletFilterCoefficients[CoifletWavelet[2], "LiftingFilter"]lf["ForwardLiftingFunction"][Range[8]]lf["InverseLiftingFunction"][%]Coiflet scaling function of order 1:
Plot[WaveletPhi[CoifletWavelet[1], x], {x, -2, 3}, PlotRange -> All]Coiflet scaling function of order 4:
Plot[WaveletPhi[CoifletWavelet[4], x], {x, -5, 5}, PlotRange -> All]Plot scaling function at different refinement scales:
Table[Plot[WaveletPhi[CoifletWavelet[1], x, MaxRecursion -> i], {x, -2, 3}, PlotLabel -> "scale " <> ToString[i]], {i, 1, 8, 2}]Coiflet wavelet function of order 1:
Plot[WaveletPsi[CoifletWavelet[1], x], {x, -2, 3}, PlotRange -> All]Plot[WaveletPsi[CoifletWavelet[4], x], {x, -3, 4}, PlotRange -> All]Plot wavelet function at different refinement scales:
Table[Plot[WaveletPsi[CoifletWavelet[1], x, MaxRecursion -> i], {x, -2, 3}, PlotLabel -> "scale " <> ToString[i], PlotRange -> All], {i, 1, 8, 2}]Wavelet Transforms (4)
Compute a DiscreteWaveletTransform:
data = Table[Tanh[t^2], {t, -3π, 3π, (6π/1023)}];ListLinePlot[data, PlotRange -> All]dwt = DiscreteWaveletTransform[data, CoifletWavelet[2], 2]View the tree of wavelet coefficients:
dwt["TreeView"]Get the dimensions of wavelet coefficients:
dwt["Dimensions"]Plot the wavelet coefficients:
WaveletListPlot[dwt, PlotLayout -> "CommonXAxis"]Compute a DiscreteWaveletPacketTransform:
data = Table[Tanh[t^2], {t, -3π, 3π, (6π/1023)}];dwpt = DiscreteWaveletPacketTransform[data, CoifletWavelet[2], 2]View the tree of wavelet coefficients:
dwpt["TreeView"]Get the dimensions of wavelet coefficients:
dwpt["Dimensions"]Plot the wavelet coefficients:
WaveletListPlot[dwpt, PlotLayout -> "CommonXAxis"]Compute a StationaryWaveletTransform:
data = Table[Tanh[t^2], {t, -3π, 3π, (6π/1023)}];swt = StationaryWaveletTransform[data, CoifletWavelet[2], 2];View the tree of wavelet coefficients:
swt["TreeView"]Get the dimensions of wavelet coefficients:
swt["Dimensions"]Plot the wavelet coefficients:
WaveletListPlot[swt, PlotLayout -> "CommonXAxis"]Compute a StationaryWaveletPacketTransform:
data = Table[Tanh[t^2], {t, -3π, 3π, (6π/1023)}];swpt = StationaryWaveletPacketTransform[data, CoifletWavelet[2], 2];View the tree of wavelet coefficients:
swpt["TreeView"]Get the dimensions of wavelet coefficients:
swpt["Dimensions"]Plot the wavelet coefficients:
WaveletListPlot[swpt, PlotLayout -> "CommonXAxis"]Higher Dimensions (1)
Multivariate scaling and wavelet functions are products of univariate ones:
ϕ = WaveletPhi[CoifletWavelet[1]];
ψ = WaveletPsi[CoifletWavelet[1]];Plot3D[Evaluate[ϕ[x]ϕ[y]], {x, -2, 3}, {y, -2, 3}, Axes -> None, ColorFunction -> "SolarColors", PlotRange -> All, Mesh -> None]Plot3D[Evaluate[ϕ[x]ψ[y]], {x, -2, 3}, {y, -2, 3}, Axes -> None, ColorFunction -> "SolarColors", PlotRange -> All, Mesh -> None]Plot3D[Evaluate[ψ[x]ϕ[y]], {x, -2, 3}, {y, -2, 3}, Axes -> None, ColorFunction -> "SolarColors", PlotRange -> All, Mesh -> None]Plot3D[Evaluate[ψ[x]ψ[y]], {x, -2, 3}, {y, -2, 3}, Axes -> None, ColorFunction -> "SolarColors", PlotRange -> All, Mesh -> None]Applications (3)
Approximate a function using Haar wavelet coefficients:
data = Table[Abs[Sin[2π x]] + 1.5Abs[Cos[2π x - π]], {x, 0, 1, (1/2^6 - 1)}];Perform a LiftingWaveletTransform:
dwd = DiscreteWaveletTransform[data, CoifletWavelet[1]];Approximate original data by keeping n largest coefficients and thresholding everything else:
{data8, data16, data32} = Table[InverseWaveletTransform@WaveletThreshold[dwd, {"LargestCoefficients", n}, Automatic], {n, {8, 16, 32}}];Compare the different approximations:
ListLinePlot[{data, data8, data16, data32}, PlotRange -> All]Compute the multiresolution representation of a signal containing an impulse:
data = Table[Sin[4π t] + 2Exp[-10 ^ 5(1 / 3 - t) ^ 2], {t, 0, 1, (1/2^9)}];ListLinePlot[data]dwt = DiscreteWaveletTransform[data, CoifletWavelet[1], 4]WaveletListPlot[dwt, {{1}, {0, 1}, {0, 0, 1}, {0, 0, 0}}, PlotLayout -> "CommonXAxis", Method -> {"Inverse" -> True}]Compare the cumulative energy in a signal and its wavelet coefficients:
data = Table[Sin[2π t], {t, 0, 1, 1 / 63}];ListPlot[data]Compute the ordered cumulative energy in the signal:
cumulativeEnergy[data_] := Module[{c = Sort[Flatten[data]^2, Greater]}, Accumulate[c] / Total[c]]ListPlot[cumulativeEnergy[data]]The energy in the signal is captured by relatively few wavelet coefficients:
dwd1 = DiscreteWaveletTransform[data, CoifletWavelet[1], 1];dwd2 = DiscreteWaveletTransform[data, CoifletWavelet[1], 2];ListPlot[{cumulativeEnergy[data], cumulativeEnergy[Last /@ dwd1[Automatic]], cumulativeEnergy[Last /@ dwd2[Automatic]]}, PlotStyle -> {Red, Blue, Orange}]Properties & Relations (11)
Lowpass filter coefficients sum to unity;
:
WaveletFilterCoefficients[CoifletWavelet[2]][[All, 2]]//Total//ChopHighpass filter coefficients sum to zero;
:
WaveletFilterCoefficients[CoifletWavelet[2], "PrimalHighpass"][[All, 2]]//Total//ChopScaling function integrates to unity;
:
ϕ = WaveletPhi[CoifletWavelet[3]];Integrate[ϕ[x], {x, -∞, ∞}]Table[NIntegrate[ϕ[(x/2^j)], {x, -∞, ∞}, AccuracyGoal -> 4] - 2^j, {j, 0, 3}]Wavelet function integrates to zero;
:
Integrate[WaveletPsi[CoifletWavelet[3], x], {x, -∞, ∞}]Wavelet function is orthogonal to the scaling function at the same scale;
:
NIntegrate[WaveletPsi[CoifletWavelet[4], x] WaveletPhi[CoifletWavelet[4], x], {x, -∞, ∞}, AccuracyGoal -> 4]The lowpass and highpass filter coefficients are orthogonal;
:
WaveletFilterCoefficients[CoifletWavelet[4]][[All, 2]].WaveletFilterCoefficients[CoifletWavelet[4], "PrimalHighpass"][[All, 2]]
satisfies the recursion equation
:
ϕ = WaveletPhi[CoifletWavelet[2]];a = WaveletFilterCoefficients[CoifletWavelet[2], "PrimalLowpass"];Plot the components and the sum of the recursion:
scalet[x_, ϕ_, a_] := 2Table[a[[i, 2]]ϕ[2x - a[[i, 1]]], {i, Length[a]}]{Plot[Evaluate@scalet[x, ϕ, a], {x, -4, 7}, PlotRange -> All],
Plot[Total@scalet[x, ϕ, a], {x, -4, 7}, PlotRange -> All]}
satisfies the recursion equation
:
ϕ = WaveletPhi[CoifletWavelet[2]];b = WaveletFilterCoefficients[CoifletWavelet[2], "PrimalHighpass"];Plot the components and the sum of the recursion:
wavelet[x_, ϕ_, b_] := 2Table[b[[i, 2]]ϕ[2x - b[[i, 1]]], {i, Length[b]}]{Plot[Evaluate@wavelet[x, ϕ, b], {x, -5, 6}, PlotRange -> All], Plot[Total@wavelet[x, ϕ, b], {x, -5, 6}, PlotRange -> All]}Frequency response for
is given by
:
h[wav_, ω_] := With[{a = WaveletFilterCoefficients[wav]}, Sum[a[[i, 2]]Exp[-I a[[i, 1]]ω], {i, Length[a]}]]The filter is a lowpass filter:
Plot[Abs[h[CoifletWavelet[2], ω]], {ω, -π, π}, Ticks -> {{-π, -(π/2), 0, (π/2), π}, Automatic}, AxesLabel -> {ω, Abs[H[ω]]}]The higher the order n, the flatter the response function at the ends:
Plot[{Abs[h[CoifletWavelet[2], ω]], Abs[h[CoifletWavelet[5], ω]]}, {ω, -π, π}, Ticks -> {{-π, -(π/2), 0, (π/2), π}, Automatic}, AxesLabel -> {ω, Abs[H[ω]]}]Fourier transform of
is given by
:
h[wav_, ω_] := With[{a = WaveletFilterCoefficients[wav]}, Sum[a[[i, 2]]Exp[-I a[[i, 1]]ω], {i, Length[a]}]]fh[wav_, ω_, j_] := Abs[Product[h[wav, (ω/2^i)], {i, j}]]Plot[fh[CoifletWavelet[4], ω, 10], {ω, -5Pi, 5Pi}, PlotRange -> All,
AxesLabel -> {ω, Abs[ Overscript[ϕ, ^ ][ω]]}]Frequency response for
is given by
:
g[wav_, ω_] := With[{b = WaveletFilterCoefficients[wav, "PrimalHighpass"]}, Sum[b[[i, 2]]Exp[-I b[[i, 1]]ω], {i, Length[b]}]
]The filter is a highpass filter:
Plot[Abs[g[CoifletWavelet[2], ω]], {ω, -π, π}, Ticks -> {{-π, -(π/2), 0, (π/2), π}, Automatic}, AxesLabel -> {ω, Abs[G[ω]]}]The higher the order n, the flatter the response function at the ends:
Plot[{Abs[g[CoifletWavelet[2], ω]], Abs[g[CoifletWavelet[5], ω]]}, {ω, -π, π}, Ticks -> {{-π, -(π/2), 0, (π/2), π}, Automatic}, AxesLabel -> {ω, Abs[G[ω]]}]Fourier transform of
is given by
:
h[wav_, ω_] := With[{a = WaveletFilterCoefficients[wav]}, Sum[a[[i, 2]]Exp[-I a[[i, 1]]ω], {i, Length[a]}]]g[wav_, ω_] := With[{b = WaveletFilterCoefficients[wav, "PrimalHighpass"]}, Sum[b[[i, 2]]Exp[-I b[[i, 1]]ω], {i, Length[b]}]
]fg[wav_, ω_, j_] := Abs[g[wav, (ω/2)]Product[h[wav, (ω/2^i)], {i, 2, j}]]Plot[fg[CoifletWavelet[2], ω, 10], {ω, -5Pi, 5Pi}, PlotRange -> All,
AxesLabel -> {ω, Abs[ Overscript[ψ, ^ ][ω]]}]Possible Issues (1)
CoifletWavelet is restricted to n less than 5:
WaveletPhi[CoifletWavelet[6]]CoifletWavelet is not defined when n is not a positive machine integer:
WaveletPhi[CoifletWavelet[2 + I]]Neat Examples (2)
Plot translates and dilations of scaling function:
ϕ[x_, j_, k_] := 2^j / 2WaveletPhi[CoifletWavelet[1], 2^jx - k]Plot[Evaluate@Table[ϕ[x, j, 0], {j, 0, 4}], {x, -0.5, 0.5}, Filling -> Axis, PlotRange -> All]Plot[Evaluate@Table[ϕ[x, 2, k], {k, 0, 2^2 - 1}], {x, -0.5, 1.5}, Filling -> Axis, PlotRange -> All]Plot translates and dilations of wavelet function:
ψ[x_, j_, k_] := 2^j / 2WaveletPsi[CoifletWavelet[1], 2^jx - k]Plot[Evaluate@Table[ψ[x, j, 0], {j, 0, 4}], {x, -0.5, 1}, Filling -> Axis, PlotRange -> All]Plot[Evaluate@Table[ψ[x, 2, k], {k, 0, 2^2 - 1}], {x, -0.5, 1.5}, Filling -> Axis, PlotRange -> All]Tech Notes
Related Guides
History
Text
Wolfram Research (2010), CoifletWavelet, Wolfram Language function, https://reference.wolfram.com/language/ref/CoifletWavelet.html.
CMS
Wolfram Language. 2010. "CoifletWavelet." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CoifletWavelet.html.
APA
Wolfram Language. (2010). CoifletWavelet. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CoifletWavelet.html
BibTeX
@misc{reference.wolfram_2026_coifletwavelet, author="Wolfram Research", title="{CoifletWavelet}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/CoifletWavelet.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_coifletwavelet, organization={Wolfram Research}, title={CoifletWavelet}, year={2010}, url={https://reference.wolfram.com/language/ref/CoifletWavelet.html}, note=[Accessed: 12-June-2026]}