applies a bandstop 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.

applies a bandstop filter to image.

applies a bandstop filter to sampled sound object.

Details and OptionsDetails and Options

  • BandstopFilter works with arbitrary-rank numerical arrays, regular and irregular time series, 2D and 3D images, and sampled sound objects, operating separately on each channel.
  • When applied to images and multidimensional arrays, filtering is applied successively to each dimension starting at level 1. BandstopFilter[data,{{ω11,ω21},}] uses the frequency {ω1i,ω2i} for the i^(th) dimension.
  • The frequency values ωi should be between 0 and .
  • BandstopFilter[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
  • Possible sound objects include:
  • SampledSoundList[{a1,a2,},r]amplitude levels given in a list
    SampledSoundFunction[f,n,r]amplitude levels generated by a function
    Sound[prims,]excluding SoundNote objects in prims
  • 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×.

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Bandstop filter a unit step sequence:

Click for copyable input

Bandstop filtering of a sinusoidal sequence:

Click for copyable input

Bandstop filtering of an image:

Click for copyable input
Introduced in 2012
| Updated in 2015