idealfilter
timeseries
の理想フィルター
説明
tsout = idealfilter(
は、tsin
,interval
,filtertype
)timeseries
オブジェクト tsin
について、型が filtertype
である理想 (非因果的) フィルターを、interval
で指定した周波数範囲に適用します。
理想フィルターは非因果的であり、フィルターの振幅の端は周波数領域で変動が少ないです。ts
のデータにはゼロ平均がなければなりません。
tsout = idealfilter(
はオプションで、フィルターを適用する tsin
,interval
,filtertype
,ind
)tsin
の行または列インデックスを指定します。
例
理想ノッチ フィルターとパス フィルターの適用
最初に、理想ノッチ フィルターを timeseries
オブジェクトに適用してから、パス フィルターを適用します。
ファイル count.dat
のデータを読み取り、行列 count
から timeseries
オブジェクトを作成します。
load count.dat
tsin = timeseries(count(:,1),1:24);
tsin
のデータの平均値を計算します。
tsinmean = mean(tsin);
データのフィルター処理用に周波数範囲を Hz 単位で定義します。
interval = [0.08 0.2];
理想ノッチ フィルターを呼び出します。
tsoutnotch = idealfilter(tsin,interval,'notch');
元のデータとフィルター処理されたデータを比較します。
plot(tsin,'-.') hold on plot(tsoutnotch,'-')
フィルター処理されたデータの平均値を復元します。
tsoutnotchmean = tsoutnotch + tsinmean; plot(tsoutnotchmean,':') title('Notch Filter') legend('Original Data','Filtered Data','Mean Restored',... 'Location','NorthWest') hold off
pass
フィルターを使用してフィルター処理を繰り返します。
plot(tsin,'-.') hold on tsoutpass = idealfilter(tsin,interval,'pass'); plot(tsoutpass,'-') tsoutpassmean = tsoutpass + tsinmean; plot(tsoutpassmean,':') title('Pass Filter') legend('Original Data','Filtered Data','Mean Restored',... 'Location','NorthWest')
入力引数
tsin
— 入力 timeseries
スカラー
ゼロ平均の入力 timeseries
。スカラーとして指定します。
tsin
が等間隔にサンプリングされていない場合、idealfilter
はフィルターを適用する前に、均等な時間ベクトルでデータを再度サンプリングします。idealfilter
は、フィルターを適用する前に、tsin
のすべてのNaN
要素を、tsin
に関連付けられている内挿法を使用して置き換えます。
データ型: timeseries
interval
— 周波数範囲
2 列の行列
周波数範囲。2 列の行列として指定します。この行列の各行は、各間隔の開始周波数と終了周波数を表します。
データ型: double
| single
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
filtertype
— フィルター タイプ
'pass'
| 'notch'
フィルター タイプ。次のオプションのいずれかとして指定します。
'pass'
— 特定の周波数範囲の変動を許可'notch'
— 特定の周波数範囲の変動を消去します。
データ型: double
| single
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
ind
— 行または列インデックス
スカラー | ベクトル
行または列インデックス。正の整数値スカラーまたはベクトルとして指定します。ind
は、列方向のデータ (tsin.IsTimeFirst
が true
) の列インデックスと行方向のデータ (tsin.IsTimeFirst
が false
) の行インデックスを表します。
データ型: double
| single
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
バージョン履歴
R2006a より前に導入
参考
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)