represents a Blackman–Harris window function of x.
BlackmanHarrisWindow
represents a Blackman–Harris window function of x.
Details
- BlackmanHarrisWindow is a window function typically used in signal processing applications where data needs to be processed in short segments.
- Window functions have a smoothing effect by gradually tapering data values to zero at the ends of each segment.
- BlackmanHarrisWindow[x] is equal to
. - BlackmanHarrisWindow automatically threads over lists.
Examples
open all close allBasic Examples (3)
Shape of a 1D Blackman–Harris window:
Plot[BlackmanHarrisWindow[x], {x, -1, 1}]Shape of a 2D Blackman–Harris window:
Plot3D[BlackmanHarrisWindow[x]BlackmanHarrisWindow[y], {x, -1, 1}, {y, -1, 1}, PlotRange -> All]Extract the continuous function representing the Blackman–Harris window:
FunctionExpand[BlackmanHarrisWindow[x]]Scope (4)
BlackmanHarrisWindow[0.1]Translated and dilated Blackman–Harris window:
Plot[BlackmanHarrisWindow[(x - 1) / 2], {x, -1, 3}]2D Blackman–Harris window with a circular support:
Plot3D[BlackmanHarrisWindow[Sqrt[x ^ 2 + y ^ 2]], {x, -1, 1}, {y, -1, 1}, PlotRange -> All]Discrete Blackman–Harris window of length 15:
ListPlot[Array[BlackmanHarrisWindow, 15, {-1 / 2, 1 / 2}], Filling -> Axis]Discrete 15×10 2D Blackman–Harris window:
ListPointPlot3D[Array[BlackmanHarrisWindow[#1] BlackmanHarrisWindow[#2]&, {15, 10}, {{-1 / 2, 1 / 2}}], Filling -> Axis, PlotRange -> All]Applications (3)
Create a moving average filter of length 11:
h = ConstantArray[1 / 11., 11]Taper the filter using a Blackman–Harris window:
fir = # / Total[#]&[h Array[BlackmanHarrisWindow, Length[h], {-1 / 2, 1 / 2}]];Log-magnitude plot of the power spectra of the two filters:
LogLinearPlot[Evaluate[20Log[10, Abs@ListFourierSequenceTransform[#, ω]]& /@ {h, fir}], {ω, 0.01, Pi}, PlotRange -> All, GridLines -> Automatic, ImageSize -> 300]Use a window specification to calculate sample PowerSpectralDensity:
proc = ARMAProcess[1, {.5}, {.3}, 1];
data = RandomFunction[proc, {50}];spec = PowerSpectralDensity[data, w, BlackmanHarrisWindow];Compare to spectral density calculated without a windowing function:
sd = PowerSpectralDensity[data, w];sd === specThe plot shows that window smooths the spectral density:
Plot[{sd, spec}, {w, -π, π}, PlotRange -> All, PlotLegends -> {"no window", "with window"}]Compare to the theoretical spectral density of the process:
Plot[{spec, Evaluate@PowerSpectralDensity[proc, w]}, {w, -π, π}, PlotLegends -> {"data", "process"}]Use a window specification for time series estimation:
data = RandomFunction[ARMAProcess[1, {.3}, {.4}, 1], {300}];Specify window for spectral estimator:
EstimatedProcess[data, ARMAProcess[1, 1], ProcessEstimator -> {"SpectralEstimator", "Window" -> BlackmanHarrisWindow}]Properties & Relations (2)
The area under the Blackman–Harris window:
area = Integrate[BlackmanHarrisWindow[x], {x, -∞, ∞}]Normalize to create a window with unit area:
Plot[{BlackmanHarrisWindow[x], BlackmanHarrisWindow[x] / area}, {x, -1, 1}, PlotRange -> All]Fourier transform of the Blackman–Harris window:
f = FourierTransform[BlackmanHarrisWindow[x], x, w]Power spectrum of the Blackman–Harris window:
LogLinearPlot[20 Log[10, Abs[f]], {w, .1, 100}]Related Guides
History
Text
Wolfram Research (2012), BlackmanHarrisWindow, Wolfram Language function, https://reference.wolfram.com/language/ref/BlackmanHarrisWindow.html.
CMS
Wolfram Language. 2012. "BlackmanHarrisWindow." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/BlackmanHarrisWindow.html.
APA
Wolfram Language. (2012). BlackmanHarrisWindow. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BlackmanHarrisWindow.html
BibTeX
@misc{reference.wolfram_2026_blackmanharriswindow, author="Wolfram Research", title="{BlackmanHarrisWindow}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/BlackmanHarrisWindow.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_blackmanharriswindow, organization={Wolfram Research}, title={BlackmanHarrisWindow}, year={2012}, url={https://reference.wolfram.com/language/ref/BlackmanHarrisWindow.html}, note=[Accessed: 12-June-2026]}