Main Content

array2cwtfilters

Convert deep-learning CWT filter tensor to filter bank matrix

Since R2022b

    Description

    psif = array2cwtfilters(psifvec,filteridx) reconstructs an approximation to the continuous wavelet filter bank matrix psif from the reduced-weight CWT filter tensor psifvec and the bookkeeping matrix filteridx.

    example

    Examples

    collapse all

    Create a CWT filter tensor compatible with dlcwt. Specify a threshold of –Inf which trivially reshapes the filter bank.

    fb = cwtfilterbank(SignalLength=2048,Boundary="periodic");
    [psifvec,filteridx] = cwtfilters2array(fb,-Inf);

    Confirm you can recover the filter bank exactly with array2cwtfilters.

    psifR = array2cwtfilters(psifvec,filteridx);
    psif = freqz(fb,FrequencyRange="twosided");
    max(abs(psifR(:)-psif(:)))
    ans = 
    1.9687e-308
    

    Input Arguments

    collapse all

    Reduced-weight CWT filter tensor, specified as a 1-by-1-by-Nr tensor, where Nr is the number of weights in the reduced-weight CWT filter bank. psifvec is the output of cwtfilters2array.

    Data Types: double

    Bookkeeping matrix that describes psifvec, specified as a matrix. filteridx is the output of cwtfilters2array.

    Data Types: uint32

    Output Arguments

    collapse all

    CWT filter bank matrix, returned as a matrix. If you set IncludeLowpass to true when creating psifvec, the final row of psif is the lowpass (scaling) filter.

    Data Types: double

    Version History

    Introduced in R2022b

    See Also

    Functions

    Objects