Main Content

wpviewcf

Plot wavelet packets colored coefficients

    Description

    example

    wpviewcf(T,cmode) plots the colored coefficients for the terminal nodes of the wavelet packet tree T using the color mode cmode.

    wpviewcf(T,cmode,nbcol) uses nbcol colors.

    Examples

    collapse all

    Create a wavelet packet tree using the Haar wavelet.

    Fs = 200;
    x = 0:1/Fs:1;
    y = sin(8*pi*x);
    t = wpdec(y,3,"haar");

    Use plot, the plot tree GUI, to plot the tree.

    plot(t)

    Click the node (3,0) to get this figure:

    Plot the colored wavelet packet coefficients.

    wpviewcf(t,1)

    Input Arguments

    collapse all

    Wavelet packet tree, specified as a wptree object.

    Color mode to use to plot the coefficients, specified by one of the values listed here.

    Color ModeDescription
    1Frequency order – Global coloration – Absolute values
    2Frequency order – By level – Absolute values
    3Frequency order – Global coloration – Values
    4Frequency order – By level coloration – Values
    5Natural order – Global coloration – Absolute values
    6Natural order – By level – Absolute values
    7Natural order – Global coloration – Values
    8Natural order – By level coloration – Values

    Number of colors to use to plot the coefficients, specified as a positive integer.

    Version History

    Introduced before R2006a

    See Also