Main Content

wmaxlev

Maximum wavelet decomposition level

Description

example

L = wmaxlev(S,wname) returns the maximum level L possible for a wavelet decomposition of a signal or image of size S using the wavelet specified by wname (see wfilters for more information). The maximum level is the last level for which at least one coefficient is correct.

wmaxlev returns the maximum allowed level decomposition, but in a general, a smaller value is taken.

Examples

collapse all

Return the maximum level of decomposition of a 1-D signal with 1024 samples using the Haar wavelet.

s = 1024;
wv = 'haar';
l = wmaxlev(s,wv)
l = 10

Return the maximum level using the db7 wavelet.

wv = 'db7';
l = wmaxlev(s,wv)
l = 6

Return the maximum level of decomposition for a 2-D signal of dimension 512-by-128 using the Haar wavelet.

s = [512 128];
wv = 'haar';
l = wmaxlev(s,wv)
l = 7

Observe the maximum level is the same when taking the minimum of the two dimensions.

l = wmaxlev(min(s),wv)
l = 7

Return the maximum level using the db7 wavelet.

wv = 'db7';
l = wmaxlev(s,wv)
l = 3

Input Arguments

collapse all

Size of signal or image, specified as a positive integer for a signal, or two-element vector of positive integers for an image.

Data Types: double

Wavelet used to determine maximum level of wavelet decomposition. The wavelet is from one of the following wavelet families: Best-localized Daubechies, Beylkin, Coiflets, Daubechies, Fejér-Korovkin, Haar, Han linear-phase moments, Morris minimum-bandwidth, Symlets, Vaidyanathan, Discrete Meyer, Biorthogonal, and Reverse Biorthogonal. See wfilters for the wavelets available in each family.

Version History

Introduced before R2006a