BandpassFilter[data,{ω1,ω2}]
カットオフ周波数が ω1と ω2のバンドパスフィルタをデータの配列に適用する.
BandpassFilter[data,{{ω,q}}]
中心周波数 ω,Q値 q を使う.
BandpassFilter[data,spec,n]
長さ n のフィルタカーネルを使う.
BandpassFilter[data,spec,n,wfun]
平滑化窓 wfun をフィルタカーネルに適用する.
BandpassFilter
BandpassFilter[data,{ω1,ω2}]
カットオフ周波数が ω1と ω2のバンドパスフィルタをデータの配列に適用する.
BandpassFilter[data,{{ω,q}}]
中心周波数 ω,Q値 q を使う.
BandpassFilter[data,spec,n]
長さ n のフィルタカーネルを使う.
BandpassFilter[data,spec,n,wfun]
平滑化窓 wfun をフィルタカーネルに適用する.
詳細とオプション
- バンドパスフィルタリングは.音声イコライザーや音声受信機で,信号内の中周波数は変更せずに低周波数と高周波数を減衰させるためにしばしば使用される.
- BandpassFilterは,窓法で作成された有限インパルス応答 (FIR) カーネルを使用してデジタル信号をたたみ込みむ.
- カーネルが長くなると周波数の識別が向上する.
- data は次のいずれでもよい.
-
list 任意階数の数値配列 tseries TimeSeriesやTemporalDataのような時間データ image 任意のImageオブジェクトまたはImage3Dオブジェクト audio AudioオブジェクトまたはSoundオブジェクト video Videoオブジェクト - 減衰される周波数の範囲はカットオフ周波数 ω1および ω2 (ω2>ω1)に依存する.
- 画像や多次元配列に適用された場合,フィルタリングはレベル1から始めて各次元に連続的に適用される.BandpassFilter[data,{{ω11,ω21},…}]は i 次元で周波数{ω1i,ω2i}を使う.
- BandpassFilter[data,{ω1,ω2}]はカットオフ周波数{ω1,ω2}と入力 data に適したフィルタカーネル長と平滑化窓を使う.
- よく使われる窓 wfun
-
BlackmanWindow Blackman窓で平滑化する DirichletWindow 平滑化は行わない HammingWindow ハミング窓で平滑化する {v1,v2,…} 値 viの窓を使う f
から
の範囲で f をサンプリングすることで窓を作る - 使用可能なオプション
-
Padding "Fixed" 使用する充填値 SampleRate Automatic 入力に想定されるサンプルレート - デフォルトでデータと同様画像にもSampleRate->1が想定される.音声信号と時系列については,サンプルレートは抽出されるか入力データから計算されるかする.
- SampleRatesr の場合,カットオフ周波数 ωcは 0から sr
まででなければならない.
例題
すべて開く すべて閉じる例 (3)
data = Table[Cos[x] + Cos[10x] + Cos[20x], {x, 0, 2Pi, 0.04}];
filtered = BandpassFilter[data, {.2, .6}, 31];
ListLinePlot[{data, filtered}, PlotLegends -> {"original", "filtered"}]BandpassFilter[\!\(\*AudioBox[""]\), {Quantity[500, "Hertz"], Quantity[2500, "Hertz"]}]BandpassFilter[[image], {0.5, .8}, 25]//ImageAdjustスコープ (14)
データ (8)
data = BoxMatrix[5, {41}];
ListLinePlot[{data, BandpassFilter[data, {.5, 1.5}, 15]}, PlotRange -> All]data = Table[UnitBox[(n/7), (m/7)], {n, -7, 7}, {m, -7, 7}];
ListPlot3D[data]BandpassFilter[data, {0.5, 1.5}]//ListPlot3DTimeSeriesにフィルタをかける:
ts = TemporalData[TimeSeries, {{{0., -0.27267267057145633, -0.6672983789995302, -0.5338541947930846,
-0.6117404489279314, -0.6755527076595494, -0.02125421294486496, -0.10792797291843935,
-0.6138271235477938, -0.3248568606554575, -0.08843449054 ... 2053424, -0.49980440691873723, -0.5388679788215971,
-0.4101602764645551}}, {{0, 1., 0.01}}, 1, {"Continuous", 1}, {"Continuous", 1}, 1,
{ValueDimensions -> 1, ResamplingMethod -> {"Interpolation", InterpolationOrder -> 1}}}, False,
10.1];
filtered = BandpassFilter[ts, {Quantity[5, "Hertz"], Quantity[10, "Hertz"]}];ListLinePlot[{ts, filtered}, PlotRange -> All, PlotLegends -> {"original data", "filtered"}]3全音信号のSoundオブジェクトにバンドパスフィルタをかける:
snd = Sound[SampledSoundList[Table[Sin[2 π 697 t] + Sin[2 π 1209 t] + Sin[2π 1633 t], {t, 0., 0.3, 1 / 8000.}], 8000]]長さ101のBlackman窓でバンドパスフィルタを使って外側の音を除去する:
BandpassFilter[snd, {Quantity[1000, "Hertz"], Quantity[1400, "Hertz"]}, 101, BlackmanWindow]BandpassFilter[[image], {0.5, 1.5}]//ImageAdjustBandpassFilter[Video["ExampleData/fish.mp4"], {.2, 1.5}]BandpassFilter[[image], {0.25, 1.25}]BandpassFilter[{0, 0, 0, 1, 1, 1, 0, 0, 0}, {Pi / 2, Pi}, 3]パラメータ (6)
サンプルレート s の音声信号では,数値周波数は rad/s 数量として解釈される:
a = \!\(\*AudioBox[""]\);BandpassFilter[a, {{Quantity[1000, "Hertz"], 1.}}] === BandpassFilter[a, {{Quantity[1000*2*Pi, "Radians"/"Seconds"], 1.}}] === BandpassFilter[a, {{1000 2 Pi, 1.}}]カットオフ周波数が8000Hzと12000Hzのバンドパスフィルタを使ってホワイトノイズ信号にフィルタをかける:
noise = AudioGenerator["White", 0.2];
Periodogram[noise]Periodogram[BandpassFilter[noise, {Quantity[8000, "Hertz"], Quantity[12000, "Hertz"]}]]Periodogram[BandpassFilter[noise, {{Quantity[9798, "Hertz"], 2}}]]Periodogram[BandpassFilter[noise, {{Quantity[9798, "Hertz"], 5}}]]noise = AudioGenerator["White", 0.2];
Periodogram[BandpassFilter[noise, {Quantity[8000, "Hertz"], Quantity[12000, "Hertz"]}, 33]]Periodogram[BandpassFilter[noise, {Quantity[8000, "Hertz"], Quantity[12000, "Hertz"]}, 55]]a = AudioGenerator[Sin[11025 2 π #^2]&];
Periodogram[BandpassFilter[a, {Quantity[5000, "Hertz"], Quantity[15000, "Hertz"]}, 33, #]& /@ {DirichletWindow, HammingWindow, BlackmanWindow}, PlotLegends -> {"Dirichlet", "Hamming", "Hann"}]調節可能なカイザー(Kaiser)窓を使って減衰量を変える:
Periodogram[Table[BandpassFilter[a, {Quantity[5000, "Hertz"], Quantity[15000, "Hertz"]}, 33, KaiserWindow[#, b]&], {b, {3, 5, 7}}], PlotLegends -> {3, 5, 7}]Periodogram[BandpassFilter[a, {Quantity[5000, "Hertz"], Quantity[15000, "Hertz"]}, 33, ConstantArray[1, {33}]]]a = AudioGenerator[Sin[11025 2 π #^2]&];
Periodogram[BandpassFilter[a, {{#, QuantityMagnitude[(#/Quantity[5000, "Hertz"])]}}, 33]& /@ {Quantity[5000, "Hertz"], Quantity[10000, "Hertz"], Quantity[15000, "Hertz"]}, PlotLegends -> {Quantity[5000, "Hertz"], Quantity[10000, "Hertz"], Quantity[15000, "Hertz"]}]Periodogram[BandpassFilter[a, {{Quantity[10000, "Hertz"], #}}, 33]& /@ {2, 4}, PlotLegends -> {2, 4}]BandpassFilter[[image], {{0.2, 0.45}, {0.45, 1}}]//ImageAdjustオプション (3)
Padding (1)
SampleRate (2)
サンプルレート sr=1を仮定して周波数 π/2に中心を置くフィルタを使う:
BandpassFilter[{0, 0, 0, 1, 1, 1, 0, 0, 0}, {{π / 2., 1}}, 5]BandpassFilter[{0, 0, 0, 1, 1, 1, 0, 0, 0}, {{3π / 2., 1}}, 5, SampleRate -> 3]ハーフバンド周波数を中心としたバンドパスフィルタをレート44100Hzでサンプリングされた音声に適用する:
noise = AudioGenerator["White", 0.2];
sr = QuantityMagnitude@AudioSampleRate[noise]BandpassFilter[noise, {{sr π / 2., 1}}]//Periodogramアプリケーション (1)
現代の88鍵のピアノでは,55番目のキー(C5)の基本周波数は約523Hzである.BandpassFilterを使って,以下の音声クリップにある基本波は保持しつつ,このキーのすべての倍音を効率的に削除する:
key55 = \!\(\*AudioBox[""]\);基本周波数(523Hz)を中心とした長さ63の狭いフィルタ(Q=3)を使う:
f = 523;
res = BandpassFilter[key55, {{2 π f, 3}}, 63]Periodogram[{key55, res}, PlotRange -> All, GridLines -> All, PlotLegends -> {"original", "filtered"}, Epilog -> {Red, InfiniteLine[{{f, 0}, {f, 1}}]}]特性と関係 (6)
BandpassFilter[{0., 0., 0., 0., 1., 1., 1., 1.}, {0, Pi}]LeastSquaresFilterKernelおよびハミング窓を使ってバンドパスフィルタを作る:
n = 5;
ω = {1, 1.5};
win = Array[HammingWindow, n, {-1 / 2, 1 / 2}];
ker = win LeastSquaresFilterKernel[{"Bandpass", ω}, n]ListConvolve[ker, {0, 0, 0, 0, 1, 1, 1, 1}, Ceiling[n / 2], 0]BandpassFilterの結果と比較する:
BandpassFilter[{0, 0, 0, 0, 1, 1, 1, 1}, ω, n, win, Padding -> 0]h = BandpassFilter[ArrayPad[{1}, 10], {0.75, 1.5}, 21]ListPlot[h, PlotRange -> All, Filling -> 0]Plot[Abs[ListFourierSequenceTransform[h, ω]], {ω, 0, π}]平滑化窓なしでの長さ21のバンドパスフィルタのインパルス応答:
h = BandpassFilter[ArrayPad[{1}, 10], {1., 1.5}, 21, None]ListPlot[h, PlotRange -> All, Filling -> 0]Plot[Abs[ListFourierSequenceTransform[h, ω]], {ω, 0, π}]バンドパスフィルタの周波数弁別はフィルタの長さが増すにつれて向上する:
Manipulate[
ListLinePlot[Abs[Fourier[BandpassFilter[ArrayPad[{1.}, 128], {Pi / 4., 3 Pi / 4.}, n, None], FourierParameters -> {1, -1}]][[ ;; 129]], ...], {{n, 21}, 3, 63, 1}]インパルス応答の長さはフィルタの品質因子が大きくなるにつれて長くなる:
Manipulate[ListPlot[x = DeleteCases[BandpassFilter[ArrayPad[{1.}, 65], {{Pi / 2, q}}, Padding -> 0], 0.], ...], {{q, 5., "𝒬"}, 1., 13.}]考えられる問題 (1)
関連するガイド
テキスト
Wolfram Research (2012), BandpassFilter, Wolfram言語関数, https://reference.wolfram.com/language/ref/BandpassFilter.html (2025年に更新).
CMS
Wolfram Language. 2012. "BandpassFilter." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/BandpassFilter.html.
APA
Wolfram Language. (2012). BandpassFilter. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BandpassFilter.html
BibTeX
@misc{reference.wolfram_2026_bandpassfilter, author="Wolfram Research", title="{BandpassFilter}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/BandpassFilter.html}", note=[Accessed: 17-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_bandpassfilter, organization={Wolfram Research}, title={BandpassFilter}, year={2025}, url={https://reference.wolfram.com/language/ref/BandpassFilter.html}, note=[Accessed: 17-June-2026]}