Quantcast

Documentation Center

  • Trial Software
  • Product Updates

wmaxlev

Maximum wavelet decomposition level

Syntax

L = wmaxlev(S,'wname')

Description

wmaxlev is a one- or two-dimensional wavelet or wavelet packets oriented function.

wmaxlev can help you avoid unreasonable maximum level values. L = wmaxlev(S,'wname') returns the maximum level decomposition of signal or image of size S using the wavelet named in the string 'wname' (see wfilters for more information).

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

Usual values are 5 for the one-dimensional case, and 3 for the two-dimensional case.

Examples

% For a 1-D signal. 
s = 2^10; 
w = 'db1';

% Compute maximum level decomposition. 
% The rule is the last level for which at least 
% one coefficient is correct. 
l = wmaxlev(s,w)

l =
    10

% Change wavelet. 
w = 'db7';

% Compute maximum level decomposition. 
l = wmaxlev(s,w)

l =
    6

% For a 2-D signal. 
s = [2^9 2^7]; 
w = 'db1';

% Compute maximum level decomposition. 
l = wmaxlev(s,w)

l =
    7

% which is the same as: 
l = wmaxlev(min(s),w)

l =
    7

% Change wavelet. 
w = 'db7';

% Compute maximum level decomposition. 
l = wmaxlev(s,w)

l =
    3

See Also

| | |

Was this topic helpful?