Main Content

upwlev

Single-level reconstruction of 1-D wavelet decomposition

    Description

    example

    [nc,nl,ca] = upwlev(c,l,wname) performs the single-level reconstruction of the wavelet decomposition structure [c,l] using the wavelet specified by wname, giving the new decomposition structure [nc,nl], and extracts the last approximation coefficients vector ca.

    [nc,nl,ca] = upwlev(c,l,LoR,HiR) performs the single-level reconstruction using the specified lowpass and highpass wavelet reconstruction filters LoR and HiR, respectively.

    Examples

    collapse all

    Load a 1-D signal.

    load sumsin
    s = sumsin;
    plot(s)
    title("Signal")

    Save the current DWT extension mode. Set the DWT extension mode to zero-padding.

    origmode = dwtmode("status","nodisplay");
    dwtmode("zpd","nodisp")

    Perform a wavelet decomposition of the signal at level 3 using the db1 wavelet. The wavelet decomposition c contains the approximation coefficients at level 3, and the detail coefficients at levels 3, 2, and 1.

    [c,l] = wavedec(s,3,"db1");

    Perform a single-level reconstruction of the wavelet decomposition structure [c,l], so the new structure [nc,nl] is the wavelet decomposition structure at level 2. The wavelet decomposition nc contains the approximation coefficients at level 2, and the detail coefficients at levels 2 and 1. Plot both wavelet decompositions.

    [nc,nl] = upwlev(c,l,"db1");
    figure
    subplot(2,1,1)
    plot(c)
    title("Wavelet Decomposition, Level 3")
    subplot(2,1,2)
    plot(nc)
    title("Wavelet Decomposition, Level 2")

    Restore the original extension mode.

    dwtmode(origmode,"nodisplay")

    Input Arguments

    collapse all

    Wavelet decomposition, specified as a vector. The vector contains the wavelet coefficients. The bookkeeping vector l contains the number of coefficients by level and the signal length. For more information, see wavedec.

    Data Types: single | double
    Complex Number Support: Yes

    Bookkeeping vector, specified as a vector of positive integers. The bookkeeping vector is used to parse the coefficients in the wavelet decomposition c by level. For more information, see wavedec.

    Data Types: single | double

    Analyzing wavelet, specified as a character vector or string scalar. wname must specify the same wavelet used to obtain the original wavelet decomposition structure [c,l]. See wfilters for a list of orthogonal and biorthogonal wavelets.

    Wavelet reconstruction filters, specified as a pair of even-length real-valued vectors. LoR is the lowpass reconstruction filter, and HiR is the highpass reconstruction filter. LoR and HiR must correspond to the wavelet used to obtain the original wavelet decomposition structure [c,l]. The lengths of LoR and HiR must be equal. See wfilters for additional information.

    Data Types: single | double

    Output Arguments

    collapse all

    Wavelet decomposition, returned as a vector. The vector contains the wavelet coefficients. [c,l] is a wavelet decomposition at level n = length(l)-2, so [nc,nl] is the same decomposition at level n-1. The bookkeeping vector nl contains the number of coefficients by level and the signal length.

    Data Types: single | double
    Complex Number Support: Yes

    Bookkeeping vector, returned as a vector of positive integers. The bookkeeping vector is used to parse the coefficients in the wavelet decomposition nc by level.

    Data Types: single | double

    Approximation coefficients at level n, where n = length(l)-2, returned as a vector.

    Data Types: single | double
    Complex Number Support: Yes

    Version History

    Introduced before R2006a

    See Also

    | |