BartlettWindow

BartlettWindow[x]

represents a Bartlett window function of x.

Details

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

Examples

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  (3)

Create a moving average filter of length 11:

Smooth the filter using a Bartlett window:

Log-magnitude plot of the frequency spectrum of the filters:

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  (5)

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-time Fourier transform of the discrete Bartlett window of length 11:

Magnitude at ω=0:

Magnitude spectrum:

Power spectra of the Bartlett and rectangular windows:

Wolfram Research (2012), BartlettWindow, Wolfram Language function, https://reference.wolfram.com/language/ref/BartlettWindow.html.

Text

Wolfram Research (2012), BartlettWindow, Wolfram Language function, https://reference.wolfram.com/language/ref/BartlettWindow.html.

BibTeX

@misc{reference.wolfram_2021_bartlettwindow, author="Wolfram Research", title="{BartlettWindow}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/BartlettWindow.html}", note=[Accessed: 18-May-2021 ]}

BibLaTeX

@online{reference.wolfram_2021_bartlettwindow, organization={Wolfram Research}, title={BartlettWindow}, year={2012}, url={https://reference.wolfram.com/language/ref/BartlettWindow.html}, note=[Accessed: 18-May-2021 ]}

CMS

Wolfram Language. 2012. "BartlettWindow." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/BartlettWindow.html.

APA

Wolfram Language. (2012). BartlettWindow. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BartlettWindow.html