Main Content

このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。

wpcoef

ウェーブレット パケット係数

    説明

    wpcoef は、1 次元または 2 次元のウェーブレット パケット解析関数です。

    x = wpcoef(wpt,n) は、ウェーブレット パケット ツリー wpt のノード n に関連付けられた係数を返します。ノード n が存在しない場合、x = [] となります。

    x = wpcoef(wpt)x = wpcoef(wpt,0) と等価です。

    すべて折りたたむ

    1 次元信号を読み込みます。現在の拡張モードを保存します。

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

    dwtmode を使用して拡張モードをゼロ パディングに変更します。db1 ウェーブレットを使用して、信号のレベル 3 ウェーブレット パケット分解に対応するウェーブレット パケット ツリー オブジェクトを取得します。ツリーをプロットします。

    dwtmode('zpd','nodisp')
    wpt = wpdec(x,3,"db1");
    plot(wpt)

    Figure contains 2 axes objects and other objects of type uimenu. Axes object 1 with title Tree Decomposition contains 29 objects of type line, text. Axes object 2 with title data for node: 0 or (0,0). contains an object of type line.

    ノード (3,0) で係数を取得します。信号と係数をプロットします。

    cfs = wpcoef(wpt,[3 0]);
    subplot(2,1,1)
    plot(x)
    title('Signal')
    axis tight
    subplot(2,1,2)
    plot(cfs)
    title('Packet (3,0) Coefficients')
    axis tight

    Figure contains 2 axes objects. Axes object 1 with title Signal contains an object of type line. Axes object 2 with title Packet (3,0) Coefficients contains an object of type line.

    イメージを読み込みます。sym4 ウェーブレットを使用して、イメージのレベル 1 ウェーブレット パケット分解に対応するウェーブレット パケット ツリーを取得します。

    load woman2
    t = wpdec2(X,1,'sym4');

    ツリーをプロットします。

    plot(t)

    Figure contains 2 axes objects and other objects of type uimenu. Axes object 1 with title Tree Decomposition contains 9 objects of type line, text. Axes object 2 with title data for node: 0 or (0,0). contains an object of type image.

    ノード (1,0) で係数を取得します。係数をプロットします。

    cfs = wpcoef(t,[1 0]);
    figure
    imagesc(cfs)
    title('Packet (1,0) Coefficients')
    colormap(pink)

    Figure contains an axes object. The axes object with title Packet (1,0) Coefficients contains an object of type image.

    拡張モードを元の設定に戻します。

    dwtmode(origMode,'nodisp')

    入力引数

    すべて折りたたむ

    ウェーブレット パケット ツリー。wptree オブジェクトとして指定します。

    ウェーブレット パケット ツリーのノード。非負の整数または非負の整数ペアとして指定します。depo2ind および ind2depo を参照してください。

    例: wpt = wpdec(1:256,2,"sym4") の場合、wpcoef(wpt,3)wpcoef(wpt,[2 0]) は同じノードを指定します。

    データ型: double

    出力引数

    すべて折りたたむ

    ノード係数。ベクトルまたは行列として返されます。

    データ型: double

    バージョン履歴

    R2006a より前に導入