Let
Where
Let
Consider the interval
Define
Define
The parameter
The index
The i-th
Where
$\alpha = a + 2k\mu \Delta x$ $\beta = a + \left( {2k + 1} \right)\mu \Delta x$ $\gamma = a + 2\left( {k + 1} \right)\mu \Delta x$ $\mu = M/m$
and
MATLAB R2022 or later
- Haar.m: Haar function - This function is used to generate the wavelet function for any a<=x<=b
- ExpandHaarSeries.m: This function reconstructs any function
$f$ using Haar wavelets as a basis. Larger$J$ gives a better approximation. - HaarMain.m: A MATLAB script that shows how to implement the two functions.
Result 1: Eight First Haar Wavelets
![]() |
|---|
Result 2: Expanding Functions into wavelets series
Let
![]() |
![]() |
|---|---|
| Plot of Reconstrction | Plot of Coefficients, |
Let
![]() |
![]() |
|---|---|
| Plot of Reconstrction | Plot of Coefficients, |
Lepik, Ü., & Hein, H. (2014). Haar wavelets. In Haar wavelets: with applications (pp. 7-20). Cham: Springer International Publishing.




