メインコンテンツ

filter

timeseries オブジェクトの周波数成分の変更

説明

tsout = filter(tsin,b,a) は、有理伝達関数フィルター b(z−1)/a(z−1) を、timeseries オブジェクト tsin で等間隔に配置されているデータに適用します。分子 b と分母 a は、伝達関数係数を含むベクトルです。

tsout = filter(tsin,b,a,ind) は、フィルター処理する列または行のインデックスを指定します。ind は、列方向のデータ (tsin.IsTimeFirsttrue) の列インデックスと行方向のデータ (tsin.IsTimeFirstfalse) の行インデックスを表す整数のベクトルです。

すべて折りたたむ

この例では、一連のデータに次の伝達関数を適用します。

H(z-1)=b(z-1)a(z-1)=2+3z-11+0.2z-1

count.dat の行列 count から timeseries オブジェクトを作成します。

load count.dat
tsin = timeseries(count(:,1),[1:24]);

伝達関数の分母係数と分子係数を入力します。係数を z-1 の昇べきの順に並べて、1+0.2x および 2-3z-1 を表します。

a = [1 0.2];
b = [2 3];

filter を使用して伝達関数を適用し、元のデータをフィルター処理されたデータと比較します。

tsout = filter(tsin,b,a);
plot(tsin)
hold on
plot(tsout)
legend('Original Data','Filtered Data','Location','NorthWest')

Figure contains an axes object. The axes object with title Time Series Plot:unnamed, xlabel Time (seconds), ylabel unnamed contains 2 objects of type line. These objects represent Original Data, Filtered Data.

入力引数

すべて折りたたむ

入力 timeseries。スカラーとして指定します。tsin は等間隔にサンプリングされていなければなりません。

データ型: timeseries

伝達関数の分子係数。スカラーまたはベクトルとして指定します。

伝達関数の分母係数。スカラーまたはベクトルとして指定します。

行または列インデックス。正の整数値スカラーまたはベクトルとして指定します。ind は、列方向のデータ (tsin.IsTimeFirsttrue) の列インデックスと行方向のデータ (tsin.IsTimeFirstfalse) の行インデックスを表します。

データ型: double | single | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

詳細

すべて折りたたむ

参照

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

バージョン履歴

R2006a より前に導入