DAUB

Daubechies wavelets are a family of orthogonal wavelets defining a discrete wavelet transform. They are characterized by a maximum number of vanishing moments for some given support.

This function returns the coefficients of the low-pass filter for the wavelet of order p.

Excel Usage

=DAUB(p)
  • p (int, required): Order of the zero at f=1/2 (from 1 to 34).

Returns (list[list]): A 1D array (as a row) of filter coefficients.

Example 1: Daub order 2

Inputs:

p
2

Excel formula:

=DAUB(2)

Expected output:

Result
0.482963 0.836516 0.224144 -0.12941
Example 2: Daub order 4

Inputs:

p
4

Excel formula:

=DAUB(4)

Expected output:

Result
0.230378 0.714847 0.630881 -0.0279838 -0.187035 0.0308414 0.032883 -0.0105974

Python Code

Show Code
import numpy as np
from scipy.signal import daub as scipy_daub

def daub(p):
    """
    Get coefficients for the low-pass filter producing Daubechies wavelets.

    See: https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.daub.html

    This example function is provided as-is without any representation of accuracy.

    Args:
        p (int): Order of the zero at f=1/2 (from 1 to 34).

    Returns:
        list[list]: A 1D array (as a row) of filter coefficients.
    """
    try:
        result = scipy_daub(int(p))
        return [result.tolist()]
    except Exception as e:
        return f"Error: {str(e)}"

Online Calculator

Order of the zero at f=1/2 (from 1 to 34).