represents a Bartlett window function of x.


  • BartlettWindow, also known as the triangular window, is a window function typically used for antialiasing and resampling.
  • Window functions are used in applications where data is processed in short segments and have a smoothing effect by gradually tapering data values to zero at the ends of each segment.
  • BartlettWindow[x] is equal to  1-2 x 0<=x<=1/2; 1+2 x -1/2<=x<0; 0 TemplateBox[{x}, Abs]>1/2; .
  • BartlettWindow automatically threads over lists.


open allclose all

Basic Examples  (3)

Shape of a 1D Bartlett window:

Shape of a 2D Bartlett window:

Extract the continuous function representing the Bartlett window:

Scope  (4)

Evaluate numerically:

Translated and dilated Bartlett window:

2D Bartlett window with a circular support:

Discrete Bartlett window of length 15:

Discrete 15×10 2D Bartlett window:

Applications  (4)

Create a moving average filter of length 11:

Taper the filter using a Bartlett window:


Log-magnitude plot of the power spectra of the two filters:

Filter a white noise signal using the Bartlett window method:

Use a window specification to calculate sample PowerSpectralDensity:

Calculate the spectrum:

Compare to spectral density calculated without a windowing function:

The plot shows that window smooths the spectral density:

Compare to the theoretical spectral density of the process:

Use a window specification for time series estimation:

Specify window for spectral estimator:

Properties & Relations  (6)

BartlettWindow is equivalent to a compressed UnitTriangle:

The area under the Bartlett window:

Normalize to create a window with unit area:

Fourier transform of the Bartlett window:

Power spectrum of the Bartlett window:

Discrete Bartlett window of length 15:

Normalize so the coefficients add up to 1:

Discrete-time Fourier transform of a normalized discrete Bartlett window of length 15:

Magnitude spectrum:

Power spectra of the Bartlett and rectangular window sequences:

Wolfram Research (2012), BartlettWindow, Wolfram Language function,


Wolfram Research (2012), BartlettWindow, Wolfram Language function,


Wolfram Language. 2012. "BartlettWindow." Wolfram Language & System Documentation Center. Wolfram Research.


Wolfram Language. (2012). BartlettWindow. Wolfram Language & System Documentation Center. Retrieved from


@misc{reference.wolfram_2024_bartlettwindow, author="Wolfram Research", title="{BartlettWindow}", year="2012", howpublished="\url{}", note=[Accessed: 23-May-2024 ]}


@online{reference.wolfram_2024_bartlettwindow, organization={Wolfram Research}, title={BartlettWindow}, year={2012}, url={}, note=[Accessed: 23-May-2024 ]}