Hauptinhalt

entrupd

Entropy update (wavelet packet)

    Description

    entrupd is a one- and two-dimensional wavelet packet utility.

    Tupd = entrupd(T,ent,par) returns, for a wavelet packet tree T, the updated tree Tupd using the entropy function ent with the optional parameter par.

    example

    Examples

    collapse all

    Load a signal. Save the current extension mode, then set the mode to zero padding.

    load noisdopp
    x = noisdopp;
    origMode = dwtmode("status","nodisp");
    dwtmode("zpd","nodisp")

    Use the wpdec function to decompose the signal x at level 2 with the Haar wavelet using Shannon entropy.

    t = wpdec(x,2,"haar","shannon");

    Read the entropy from all nodes.

    nodes = allnodes(t);
    ent = read(t,"ent",nodes);
    ent'
    ans = 1×7
    104 ×
    
       -5.8615   -6.8204   -0.0350   -7.7901   -0.0497   -0.0205   -0.0138
    
    

    Update the nodes entropy to "threshold".

    t = entrupd(t,"threshold",0.5);
    nent = read(t,"ent");
    nent'
    ans = 1×7
    
       937   488   320   241   175   170   163
    
    

    Restore the extension mode to the original setting.

    dwtmode(origMode,"nodisp")

    Input Arguments

    collapse all

    Tree, specified as a dtree, ntree, or wptree object.

    Entropy function, specified as one of the following:

    Entropy Function (T)

    Threshold Parameter (par)

    Comments

    "shannon" 

    par is not used.

    "log energy" 

    par is not used.

    "threshold"0 ≤ par

    par is the threshold.

    "sure"0 ≤ par

    par is the threshold.

    "norm"1 ≤ par

    par is the power.

    "user"String

    par contains the file name of your own entropy function, with a single input x.

    "FunName"No constraints on par

    FunName is any string other than the previous entropy functions listed.

    FunName contains the file name of your own entropy function, with x as input and par as an additional parameter to your entropy function.

    ent and the threshold parameter par together define the entropy criterion. For more information, see wpdec.

    Note

    The "user" option is historical and kept for compatibility, but it is obsoleted by the last option described in the table above. The FunName option does the same as the "user" option and in addition gives the possibility to pass a parameter to your own entropy function.

    Threshold parameter, specified by a real number or a string. par and the entropy function ent together define the entropy criterion.

    Version History

    Introduced before R2006a

    See Also

    |