Documentation

detcoef

1-D detail coefficients

Syntax

D = detcoef(C,L,N)
D = detcoef(C,L)

Description

detcoef is a one-dimensional wavelet analysis function.

D = detcoef(C,L,N) extracts the detail coefficients at level N from the wavelet decomposition structure [C,L]. See wavedec for more information on C and L.

Level N must be an integer such that 1 N NMAX where NMAX = length(L)-2.

D = detcoef(C,L) extracts the detail coefficients at last level NMAX.

If N is a vector of integers such that 1 ≤ N(j)NMAX:

  • DCELL = detcoef(C,L,N,'cells') returns a cell array where DCELL{j} contains the coefficients of detail N(j).

  • If length(N) > 1, DCELL = detcoef(C,L,N) is equivalent to DCELL = detcoef(C,L,N,'cells').

  • DCELL = detcoef(C,L,'cells') is equivalent to DCELL = detcoef(C,L,[1:NMAX]).

  • [D1, ... ,Dp] = detcoef(C,L,[N(1), ... ,N(p)]) extracts the details coefficients at levels [N(1), ... ,N(p)].

Examples

% The current extension mode is zero-padding (see dwtmode).

% Load original one-dimensional signal. 
load leleccum; 
s = leleccum(1:3920); 

% Perform decomposition at level 3 of s using db1. 
[c,l] = wavedec(s,3,'db1');

% Extract detail coefficients at levels 
% 1, 2 and 3, from wavelet decomposition 
% structure [c,l]. 
[cd1,cd2,cd3] = detcoef(c,l,[1 2 3]);

% Using some plotting commands,
% the following figure is generated.

See Also

|

Was this topic helpful?