double
デジタル フィルターの係数を倍精度にキャスト
説明
例
単精度および倍精度のローパス FIR フィルター
designfilt
を使用して 5 次の FIR ローパス フィルターを設計します。正規化された通過帯域周波数 ラジアン/サンプルおよび正規化された阻止帯域周波数 ラジアン/サンプルを指定します。
フィルターを単精度にキャストしてから、倍精度にキャストしなおします。各フィルターの最初の係数を表示します。
format long d = designfilt('lowpassfir','FilterOrder',5, ... 'PassbandFrequency',0.2,'StopbandFrequency', 0.55); e = single(d); f = double(e); coed = d.Coefficients(1)
coed = 0.003947882145754
coee = e.Coefficients(1)
coee = single
0.0039479
coef = f.Coefficients(1)
coef = 0.003947881981730
フィルター係数の単精度量子化の影響を倍精度で解析する場合は、double
を使用します。
入力引数
f1
— 単精度のデジタル フィルター
digitalFilter
オブジェクト
単精度のデジタル フィルター。digitalFilter
オブジェクトで指定します。周波数応答指定に基づくデジタル フィルターを生成するには、関数 designfilt
を使用し、関数 single
でそれを単精度にキャストします。
例: f1= single(designfilt('lowpassfir','FilterOrder',3,'HalfPowerFrequency',0.5))
は、正規化された 3 dB の周波数 0.5π ラジアン/サンプルを単精度にキャストした 3 次のバタワース フィルターを指定します。
出力引数
f2
— 倍精度のデジタル フィルター
digitalFilter
オブジェクト
倍精度のデジタル フィルター。digitalFilter
オブジェクトとして返されます。
バージョン履歴
R2014a で導入
参考
designfilt
| digitalFilter
| isdouble
| issingle
| single
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)