applies a bandpass filter with cutoff frequencies ω1 and ω2 to an array of data.


uses center frequency ω and quality factor q.


uses a filter kernel of length n.


applies a smoothing window wfun to the filter kernel.

Details and Options

  • BandpassFilter is used to attenuate low and high frequencies in a signal while leaving the mid-range frequencies unchanged. The range of frequencies that are attenuated is dependent on the values of the cutoff frequencies ω1 and ω2, with ω2>ω1. Bandpass filters are commonly found in audio equalizers and audio receivers.
  • The data can be any of the following:
  • listarbitrary-rank numerical array
    tseriestemporal data such as TimeSeries and TemporalData
    imagearbitrary Image or Image3D object
    audioan Audio or Sound object
  • When applied to images and multidimensional arrays, filtering is applied successively to each dimension starting at level 1. BandpassFilter[data,{{ω11,ω21},}] uses the frequencies {ω1i,ω2i} for the i^(th) dimension.
  • BandpassFilter[data,{ω1,ω2}] uses a filter kernel length and smoothing window suitable for the cutoff frequencies {ω1,ω2} and the input data.
  • Typical smoothing windows wfun include:
  • BlackmanWindowsmoothing with a Blackman window
    DirichletWindowno smoothing
    HammingWindowsmoothing with a Hamming window
    {v1,v2,}use a window with values vi
    fcreate a window by sampling f between and
  • The following options can be given:
  • Padding"Fixed"the padding value to use
    SampleRateAutomaticsample rate assumed for the input
  • By default, SampleRate->1 is assumed for images as well as data. For sampled sound objects with sample rate r, SampleRate->r is used.
  • With SampleRate->r, the cutoff frequency ωc should be between 0 and r×.


open all close all

Basic Examples  (3)

Bandpass filtering of a vector:

Click for copyable input

Bandpass filtering of audio:

Click for copyable input

Bandpass filtering of an image:

Click for copyable input

Scope  (13)

Options  (3)

Properties & Relations  (3)

Possible Issues  (1)

Interactive Examples  (1)

Introduced in 2012
Updated in 2016