Main Content

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

hamming

ハミング ウィンドウ

説明

w = hamming(L) では、L 点の対称ハミング ウィンドウが返されます。

w = hamming(L,sflag) では、sflag によって指定されたウィンドウのサンプリングを使用して、ハミング ウィンドウが返されます。

すべて折りたたむ

64 点のハミング ウィンドウを作成します。wvtool を使用して結果を表示します。

L = 64;
wvtool(hamming(L))

Figure Window Visualization Tool contains 2 axes objects and other objects of type uimenu, uitoolbar, uipanel. Axes object 1 with title Time domain, xlabel Samples, ylabel Amplitude contains an object of type line. Axes object 2 with title Frequency domain, xlabel Normalized Frequency (\times\pi rad/sample), ylabel Magnitude (dB) contains an object of type line.

2 つのハミング ウィンドウの設計:

  • 最初のウィンドウは N = 64 で、対称です。

  • 2 番目のウィンドウは N = 63 で、周期的です。

2 つのウィンドウを表示します。

Hs = hamming(64,'symmetric');
Hp = hamming(63,'periodic');
wvt = wvtool(Hs,Hp);
legend(wvt.CurrentAxes,'Symmetric','Periodic')

Figure Window Visualization Tool contains 2 axes objects and other objects of type uimenu, uitoolbar, uipanel. Axes object 1 with title Time domain, xlabel Samples, ylabel Amplitude contains 2 objects of type line. Axes object 2 with title Frequency domain, xlabel Normalized Frequency (\times\pi rad/sample), ylabel Magnitude (dB) contains 2 objects of type line. These objects represent Symmetric, Periodic.

入力引数

すべて折りたたむ

ウィンドウの長さ。正の整数で指定します。

データ型: single | double

ウィンドウ サンプリング方法。以下として指定します。

  • 'symmetric' - フィルター設計でウィンドウを使用する場合は、このオプションを使用します。

  • 'periodic' - このオプションはスペクトル解析に役立ちます。離散フーリエ変換で、ウィンドウを適用された信号に完全な周期的拡張を暗黙的にもたせることができるからです。'periodic' が指定された場合、関数では長さ L + 1 のウィンドウが計算され、最初の L 個が返されます。

出力引数

すべて折りたたむ

ハミング ウィンドウ。列ベクトルとして返されます。

アルゴリズム

ハミング ウィンドウの係数は、次の方程式で生成されます。

w(n)=0.540.46cos(2πnN),0nN.

ウィンドウの長さは、L = N + 1 です。

参照

[1] Oppenheim, Alan V., Ronald W. Schafer, and John R. Buck. Discrete-Time Signal Processing. Upper Saddle River, NJ: Prentice Hall, 1999.

拡張機能

C/C++ コード生成
MATLAB® Coder™ を使用して C および C++ コードを生成します。

バージョン履歴

R2006a より前に導入