This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Scaling and Wavelet Filter


Y = qmf(X,P)
Y = qmf(X)
Y = qmf(X,0)


Y = qmf(X,P) changes the signs of the even index elements of the reversed vector filter coefficients X if P is 0. If P is 1, the signs of the odd index elements are reversed. Changing P changes the phase of the Fourier transform of the resulting wavelet filter by π radians.

Y = qmf(X) is equivalent to Y = qmf(X,0).

Let x be a finite energy signal. Two filters F0 and F1 are quadrature mirror filters (QMF) if, for any x,


where y0 is a decimated version of the signal x filtered with F0 so y0 defined by x0 = F0(x) and y0(n) = x0(2n), and similarly, y1 is defined by x1 = F1(x) and y1(n) = x1(2n). This property ensures a perfect reconstruction of the associated two-channel filter banks scheme (see Strang-Nguyen p. 103).

For example, if F0 is a Daubechies scaling filter and F1 = qmf(F0), then the transfer functions F0(z) and F1(z) of the filters F0 and F1 satisfy the condition (see the example for db10):



Quadrature Mirror Filter

% Load scaling filter associated with an orthogonal wavelet. 
load db10; 
subplot(321); stem(db10); title('db10 low-pass filter');

% Compute the quadrature mirror filter. 
qmfdb10 = qmf(db10); 
subplot(322); stem(qmfdb10); title('QMF db10 filter');

% Check for frequency condition (necessary for orthogonality):
% abs(fft(filter))^2 + abs(fft(qmf(filter))^2 = 1 at each 
% frequency. 
m = fft(db10); 
mt = fft(qmfdb10); 
freq = [1:length(db10)]/length(db10); 
subplot(323); plot(freq,abs(m)); 
title('Transfer modulus of db10')
subplot(324); plot(freq,abs(mt)); 
title('Transfer modulus of QMF db10')
subplot(325); plot(freq,abs(m).^2 + abs(mt).^2); 
title('Check QMF condition for db10 and QMF db10') 
xlabel(' abs(fft(db10))^2 + abs(fft(qmf(db10))^2 = 1')

% Editing some graphical properties,
% the following figure is generated.

% Check for orthonormality. 
df = [db10;qmfdb10]*sqrt(2); 
id = df*df'

id =
    1.0000 0.0000 
    0.0000 1.0000

Controlling the Phase of a Quadrature Mirror Filter

This example shows the effect of setting the phase parameter of the qmf function.

Obtain the decomposition low-pass filter associated with a Daubechies wavelet.

lowfilt = wfilters('db4');

Use the qmf function to obtain the decomposition low-pass filter for a wavelet. Then, compare the signs of the values when the qmf phase parameter is set to 0 or 1. The reversed signs indicates a phase shift of $\pi$ radians, which is the same as multiplying the DFT by $e^{i \pi}$.

p0 = qmf(lowfilt,0)
p1 = qmf(lowfilt,1)
p0 =

  Columns 1 through 7

    0.2304   -0.7148    0.6309    0.0280   -0.1870   -0.0308    0.0329

  Column 8


p1 =

  Columns 1 through 7

   -0.2304    0.7148   -0.6309   -0.0280    0.1870    0.0308   -0.0329

  Column 8


Compute the magnitudes and display the difference between them. Unlike the phase, the magnitude is not affected by the sign reversals.

ans =

     0     0     0     0     0     0     0     0


Strang, G.; T. Nguyen (1996), Wavelets and Filter Banks, Wellesley-Cambridge Press.

Extended Capabilities

Introduced before R2006a

Was this topic helpful?