WOLFRAM

represents a Haar wavelet.

Details

  • HaarWavelet defines a family of orthonormal wavelets.
  • The scaling function () and wavelet function () have compact support lengths of 1. They have 1 vanishing moment and are symmetric.
  • The scaling function () is given by . »
  • The wavelet function () is given by . »
  • HaarWavelet can be used with such functions as DiscreteWaveletTransform, WaveletPhi, etc.

Examples

open allclose all

Basic Examples  (3)Summary of the most common use cases

Scaling function:

Out[1]=1
Out[2]=2

Wavelet function:

Out[1]=1
Out[2]=2

Filter coefficients:

Out[1]=1

Scope  (10)Survey of the scope of standard use cases

Basic Uses  (4)

Compute primal lowpass filter coefficients:

Out[1]=1

Primal highpass filter coefficients:

Out[1]=1

Lifting filter coefficients:

Out[1]=1
Out[2]=2

Generate function to compute lifting wavelet transform:

Out[1]=1
Out[2]=2
Out[3]=3

Wavelet Transforms  (5)

Compute a DiscreteWaveletTransform:

Out[2]=2
Out[3]=3

View the tree of wavelet coefficients:

Out[4]=4

Get the dimensions of wavelet coefficients:

Out[5]=5

Plot the wavelet coefficients:

Out[6]=6

HaarWavelet can be used to perform a DiscreteWaveletPacketTransform:

Out[2]=2

View the tree of wavelet coefficients:

Out[3]=3

Get the dimensions of wavelet coefficients:

Out[4]=4

Plot the wavelet coefficients:

Out[5]=5

HaarWavelet can be used to perform a StationaryWaveletTransform:

View the tree of wavelet coefficients:

Out[3]=3

Get the dimensions of wavelet coefficients:

Out[4]=4

Plot the wavelet coefficients:

Out[5]=5

HaarWavelet can be used to perform a StationaryWaveletPacketTransform:

View the tree of wavelet coefficients:

Out[3]=3

Get the dimensions of wavelet coefficients:

Out[4]=4

Plot the wavelet coefficients:

Out[5]=5

HaarWavelet can be used to perform a LiftingWaveletTransform:

View the tree of wavelet coefficients:

Out[3]=3

Get the dimensions of wavelet coefficients:

Out[4]=4

Plot the wavelet coefficients:

Out[5]=5

Higher Dimensions  (1)

Multivariate scaling and wavelet functions are products of univariate ones:

Out[2]=2

Applications  (4)Sample problems that can be solved with this function

Approximate a function using Haar wavelet coefficients:

Perform a LiftingWaveletTransform:

Approximate original data by keeping largest coefficients and thresholding everything else:

Compare the different approximations:

Out[4]=4

Compute the multiresolution representation of a signal containing an impulse:

Out[2]=2
Out[3]=3
Out[4]=4

Compare the cumulative energy in a signal and its wavelet coefficients:

Out[2]=2

Compute the ordered cumulative energy in the signal:

Out[4]=4

The energy in the signal is captured by relatively few wavelet coefficients:

Out[7]=7

Compare range and distribution of wavelet coefficients:

Out[2]=2

Plot distribution of wavelet coefficients:

Out[4]=4

Compare with wavelet coefficients plotted along a common axis:

Out[5]=5

Properties & Relations  (15)Properties of the function, and connections to other functions

DaubechiesWavelet[1] is equivalent to HaarWavelet:

Out[1]=1

Lowpass filter coefficients sum to unity; :

Out[1]=1

Highpass filter coefficients sum to zero; :

Out[1]=1

Scaling function integrates to unity; :

Out[1]=1

In particular, :

Out[2]=2

Haar scaling function is orthogonal to its shift; :

Out[1]=1

Wavelet function integrates to zero; :

Out[1]=1

Haar wavelet function is orthogonal to its shift; :

Out[1]=1

Wavelet function is orthogonal to the scaling function at the same scale; :

Out[1]=1

The lowpass and highpass filter coefficients are orthogonal; :

Out[2]=2

HaarWavelet has one vanishing moment; :

Out[1]=1

This means constant signals are fully represented in the scaling functions part ({0}):

Out[3]=3

Linear or higher-order signals are not:

Out[4]=4
Out[5]=5

satisfies the recursion equation :

Out[2]=2

Symbolically verify recursion:

Out[3]=3

Plot the components and the sum of the recursion:

Out[5]=5

satisfies the recursion equation :

Out[2]=2

Plot the components and the sum of the recursion:

Out[4]=4

Frequency response for is given by :

The filter is a lowpass filter:

Out[2]=2

Fourier transform of is given by :

Out[3]=3

Frequency response for is given by :

The filter is a highpass filter:

Out[2]=2

Fourier transform of is given by :

Out[4]=4

Neat Examples  (2)Surprising or curious use cases

Plot translates and dilations of scaling function:

Out[2]=2
Out[3]=3

Plot translates and dilations of wavelet function:

Out[2]=2
Out[3]=3
Wolfram Research (2010), HaarWavelet, Wolfram Language function, https://reference.wolfram.com/language/ref/HaarWavelet.html.
Wolfram Research (2010), HaarWavelet, Wolfram Language function, https://reference.wolfram.com/language/ref/HaarWavelet.html.

Text

Wolfram Research (2010), HaarWavelet, Wolfram Language function, https://reference.wolfram.com/language/ref/HaarWavelet.html.

Wolfram Research (2010), HaarWavelet, Wolfram Language function, https://reference.wolfram.com/language/ref/HaarWavelet.html.

CMS

Wolfram Language. 2010. "HaarWavelet." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/HaarWavelet.html.

Wolfram Language. 2010. "HaarWavelet." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/HaarWavelet.html.

APA

Wolfram Language. (2010). HaarWavelet. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/HaarWavelet.html

Wolfram Language. (2010). HaarWavelet. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/HaarWavelet.html

BibTeX

@misc{reference.wolfram_2025_haarwavelet, author="Wolfram Research", title="{HaarWavelet}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/HaarWavelet.html}", note=[Accessed: 26-March-2025 ]}

@misc{reference.wolfram_2025_haarwavelet, author="Wolfram Research", title="{HaarWavelet}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/HaarWavelet.html}", note=[Accessed: 26-March-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_haarwavelet, organization={Wolfram Research}, title={HaarWavelet}, year={2010}, url={https://reference.wolfram.com/language/ref/HaarWavelet.html}, note=[Accessed: 26-March-2025 ]}

@online{reference.wolfram_2025_haarwavelet, organization={Wolfram Research}, title={HaarWavelet}, year={2010}, url={https://reference.wolfram.com/language/ref/HaarWavelet.html}, note=[Accessed: 26-March-2025 ]}