HighpassFilter[data,ωc]
applies a highpass filter with a cutoff frequency ωc to an array of data.
HighpassFilter[data,ωc,n]
uses a filter kernel of length n.
HighpassFilter[data,ωc,n,wfun]
applies a smoothing window wfun to the filter kernel.
HighpassFilter
HighpassFilter[data,ωc]
applies a highpass filter with a cutoff frequency ωc to an array of data.
HighpassFilter[data,ωc,n]
uses a filter kernel of length n.
HighpassFilter[data,ωc,n,wfun]
applies a smoothing window wfun to the filter kernel.
Details and Options
- Highpass filtering is typically used to diminish a signal's low-frequency content while preserving the high frequencies.
- HighpassFilter convolves a digital signal with a finite impulse response (FIR) kernel created using the window method.
- Larger cutoff frequencies result in greater loss of low frequencies. Longer kernels result in a better frequency discrimination.
- The data can be any of the following:
-
list arbitrary-rank numerical array tseries temporal data such as TimeSeries and TemporalData image arbitrary Image or Image3D object audio an Audio or Sound object video a Video object - When applied to images and multidimensional arrays, filtering is applied successively to each dimension, starting at level 1. HighpassFilter[data,{ωc1,ωc2,…}] uses the frequency ωci for the

dimension. - HighpassFilter[data,ωc] uses a filter kernel length and smoothing window suitable for the cutoff frequency ωc and the input data.
- Typical smoothing windows wfun include:
-
BlackmanWindow smoothing with a Blackman window DirichletWindow no smoothing HammingWindow smoothing with a Hamming window {v1,v2,…} use a window with values vi f create a window by sampling f between
and 
- The following options can be given:
-
Padding "Fixed" the padding value to use SampleRate Automatic sample rate assumed for the input - By default, SampleRate->1 is assumed for images as well as lists. For audio signals and time series, the sample rate is either extracted or computed from the input data.
- With SampleRatesr, the cutoff frequency ωc should be between 0 and sr×
.
Examples
open all close allBasic Examples (3)
Highpass filtering of a sinusoidal sequence:
data = Table[Cos[2x] + 0.5Cos[20x], {x, 0, 2Pi, 0.04}];
ListLinePlot[{data, HighpassFilter[data, 0.6, 21]}, PlotLegends -> {"original", "filtered"}]Highpass filtering of an Audio object:
HighpassFilter[\!\(\*AudioBox[""]\), Quantity[1000, "Hertz"]]Highpass filtering of an image:
HighpassFilter[[image], 1., 21]//ImageAdjustScope (14)
Data (9)
data = BoxMatrix[5, {41}];
ListLinePlot[{data, HighpassFilter[data, 1.]}, PlotRange -> All]data = Table[UnitBox[(n/7), (m/7)], {n, -7, 7}, {m, -7, 7}];
ListPlot3D[data]HighpassFilter[data, 1.]//ListPlot3DFilter a TimeSeries:
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 = HighpassFilter[ts, Quantity[5, "Hertz"]];ListLinePlot[{ts, filtered}, PlotLegends -> {"original", "filtered"}, PlotRange -> All]Highpass filtering of a swept-sine audio signal:
a = AudioGenerator[Sin[5000. π#^2 + 1000. #]&]HighpassFilter[a, Quantity[2500, "Hertz"], 101, BlackmanWindow]Highpass filtering of a Sound object of a dual-tone multi-frequency (DTMF) signal:
snd = Sound[SampledSoundList[Table[Sin[2 π 697 t] + Sin[2 π 1209 t], {t, 0., 0.3, 1 / 8000.}], 8000]]Use a cutoff frequency midway between the two frequencies, a filter of length 101 and a Blackman window:
HighpassFilter[snd, Quantity[953, "Hertz"], 101, BlackmanWindow]Highpass filtering of a halftone image:
HighpassFilter[[image], 0.5]//ImageAdjustHighpassFilter[Video["ExampleData/fish.mp4"], .5]Highpass filtering of a 3D image:
HighpassFilter[[image], 0.5]HighpassFilter[{0, 0, 0, 1, 1, 1, 0, 0, 0}, Pi / 2, 3]Parameters (5)
With an audio signal, a numeric cutoff frequency is interpreted as radians per second:
a = \!\(\*AudioBox[""]\);
HighpassFilter[a, 1000 2 Pi] === HighpassFilter[a, Quantity[1000*2*Pi, "Radians"/"Seconds"]] === HighpassFilter[a, Quantity[1000, "Hertz"]]Filter a white noise signal using a cutoff frequency of 15000 Hz:
noise = AudioGenerator["White", 0.2];
Periodogram[noise]Periodogram[HighpassFilter[noise, Quantity[15000, "Hertz"]]]Periodogram[HighpassFilter[noise, Quantity[10000, "Hertz"]]]By default, the length of the filter and therefore its frequency discrimination depend on the cutoff frequency:
noise = AudioGenerator["White", 0.2];
Periodogram[HighpassFilter[noise, Quantity[18000, "Hertz"]]]Shorter filter kernels are used for lower frequencies:
Periodogram[HighpassFilter[noise, Quantity[15000, "Hertz"]]]Increase frequency discrimination by using a longer kernel:
Periodogram[HighpassFilter[noise, Quantity[15000, "Hertz"], 55]]Vary the amount of stopband attenuation by using different window functions:
a = AudioGenerator[Sin[11025 2 π #^2]&];
Periodogram[HighpassFilter[a, Quantity[15000, "Hertz"], 33, #]& /@ {DirichletWindow, HammingWindow, BlackmanWindow}, PlotLegends -> {"Dirichlet", "Hamming", "Hann"}]Vary the amount of attenuation by using the adjustable Kaiser window:
Periodogram[Table[HighpassFilter[a, Quantity[15000, "Hertz"], 33, KaiserWindow[#, b]&], {b, {3, 5, 7}}], PlotLegends -> {3, 5, 7}]Specify the window function as a numeric list:
Periodogram[HighpassFilter[a, Quantity[15000, "Hertz"], 33, ConstantArray[1, {33}]]]Use different cutoff frequencies in each dimension:
HighpassFilter[[image], {1., 1.75}]//ImageAdjustOptions (3)
Padding (1)
SampleRate (2)
Use a highpass half-band filter of length 5, assuming a normalized sample rate of sr=1:
HighpassFilter[{0, 0, 0, 0, 0, 1, 1, 1, 1, 1}, π / 2., 5]HighpassFilter[{0, 0, 0, 0, 0, 1, 1, 1, 1, 1}, 3 π / 2., 5, SampleRate -> 3]Apply a half-band highpass filter to audio sampled at a rate of
:
noise = AudioGenerator["White", 0.2];
sr = QuantityMagnitude@AudioSampleRate[noise]HighpassFilter[noise, sr π / 2., 21]//PeriodogramApplications (3)
Reduce the zero-frequency component in a periodic sequence:
x = Table[SawtoothWave[n / 8], {n, 0, 63}];
y = HighpassFilter[x, Pi / 16, 21, None, Padding -> "Periodic"];
GraphicsRow[{ListPlot[x, Filling -> 0], ListPlot[y, Filling -> 0]}]Use HighpassFilter to make an Audio object sound "thinner":
cello = \!\(\*AudioBox[""]\);HighpassFilter[cello, Quantity[800, "Hertz"]]On a modern 88-key piano, key 55 (note C5) has a fundamental frequency of approximately 523 Hz. Use HighpassFilter to effectively remove the fundamental and retain all the harmonics of this key in the following audio clip:
key55 = \!\(\*AudioBox[""]\);Use a highpass filter of length 59 with a cutoff frequency midway between the fundamental (523 Hz) and its first harmonic at 1046 Hz:
f = 1.5 523;
res = HighpassFilter[key55, 2 π f, 59]Compare the frequency spectra of the two audio clips:
Periodogram[{key55, res}, ...]Properties & Relations (8)
Using a cutoff frequency of 0 returns the original sequence:
HighpassFilter[{0, 0, 0, 0, 1, 1, 1, 1}, 0]Using cutoff frequency of π or greater returns a zero sequence:
HighpassFilter[{0, 0, 0, 0, 1, 1, 1, 1}, Pi]Create a highpass filter using LeastSquaresFilterKernel and HammingWindow:
n = 5;
ω = 1.;
win = Array[HammingWindow, n, {-1 / 2, 1 / 2}];
ker = win LeastSquaresFilterKernel[{"Highpass", ω}, n]ListConvolve[ker, {0, 0, 0, 0, 1, 1, 1, 1}, Ceiling[n / 2], 0]Compare with the result of HighpassFilter:
HighpassFilter[{0, 0, 0, 0, 1, 1, 1, 1}, ω, n, win, Padding -> 0]Impulse response of a half-band highpass filter of length 21:
h = HighpassFilter[ArrayPad[{1}, 10], Pi / 2., 21]ListPlot[h, PlotRange -> All, Filling -> 0]Magnitude spectrum of the filter:
Plot[Abs[ListFourierSequenceTransform[h, ω]], {ω, 0, π}]Impulse response of a half-band highpass filter of length 21 without a smoothing window:
h = HighpassFilter[ArrayPad[{1}, 10], π / 2., 21, None]ListPlot[h, PlotRange -> All, Filling -> 0]Magnitude spectrum of the filter:
Plot[Abs[ListFourierSequenceTransform[h, ω]], {ω, 0, π}]Impulse response of an even-length filter:
h = HighpassFilter[ArrayPad[{1}, 10], π / 2., 20, None]ListPlot[h, PlotRange -> All, Filling -> 0]Magnitude spectrum of the filter:
Plot[Abs[ListFourierSequenceTransform[h, ω]], {ω, 0, π}]The frequency discrimination of a highpass filter improves as the length of the filter is increased:
Manipulate[
ListLinePlot[Abs[Fourier[HighpassFilter[ArrayPad[{1.}, 128], Pi / 2, n, DirichletWindow], FourierParameters -> {1, -1}]][[ ;; 129]], ...], {{n, 21}, 3, 63, 2}]The length of the impulse response increases as the bandwidth of the filter is decreased:
Manipulate[ListPlot[x = DeleteCases[HighpassFilter[ArrayPad[{1.}, 65], ω, Padding -> None], 0.], ...], {{ω, 2.5, "SubscriptBox[ω, c]"}, 2., 3.}]Possible Issues (1)
Using PaddingNone will result in an output that is shorter in length than the input:
HighpassFilter[{0, 0, 0, 0, 0, 1, 1, 1, 1, 1}, 1., Padding -> None]Using kernels longer than the input will result in an empty list:
HighpassFilter[{0, 0, 0, 1, 0, 0, 0}, 1., 11, Padding -> None]History
Introduced in 2012 (9.0) | Updated in 2015 (10.2) ▪ 2016 (11.0) ▪ 2025 (14.3)
Text
Wolfram Research (2012), HighpassFilter, Wolfram Language function, https://reference.wolfram.com/language/ref/HighpassFilter.html (updated 2025).
CMS
Wolfram Language. 2012. "HighpassFilter." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/HighpassFilter.html.
APA
Wolfram Language. (2012). HighpassFilter. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/HighpassFilter.html
BibTeX
@misc{reference.wolfram_2026_highpassfilter, author="Wolfram Research", title="{HighpassFilter}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/HighpassFilter.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_highpassfilter, organization={Wolfram Research}, title={HighpassFilter}, year={2025}, url={https://reference.wolfram.com/language/ref/HighpassFilter.html}, note=[Accessed: 13-June-2026]}