BandpassFilter

BandpassFilter[data,{ω1,ω2}]

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

BandpassFilter[data,{{ω,q}}]

uses center frequency ω and quality factor q.

BandpassFilter[data,spec,n]

uses a filter kernel of length n.

BandpassFilter[data,spec,n,wfun]

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×.

Examples

open allclose all

Basic Examples  (3)

Bandpass filtering of a vector:

In[1]:=
Click for copyable input
Out[2]=

Bandpass filtering of audio:

In[1]:=
Click for copyable input
Out[1]=

Bandpass filtering of an image:

In[1]:=
Click for copyable input
Out[1]=

Scope  (13)

Options  (3)

Properties & Relations  (3)

Possible Issues  (1)

Interactive Examples  (1)

See Also

LowpassFilter  BandstopFilter  LeastSquaresFilterKernel  ListConvolve  ImageConvolve

Introduced in 2012
(9.0)
| Updated in 2016
(11.0)