represents a Dirichlet window function of x.
DirichletWindow
represents a Dirichlet window function of x.
Details
- DirichletWindow, also known as the rectangular or boxcar window, is a window function used in signal processing applications where data needs to be processed in short segments.
- DirichletWindow[x] is equal to
. - DirichletWindow automatically threads over lists.
Examples
open all close allBasic Examples (3)
Shape of a 1D Dirichlet window:
Plot[DirichletWindow[x], {x, -1, 1}, Exclusions -> None]Shape of a 2D Dirichlet window:
Plot3D[DirichletWindow[x]DirichletWindow[y], {x, -1, 1}, {y, -1, 1}, PlotRange -> All, Exclusions -> None]Extract the continuous function representing the Dirichlet window:
FunctionExpand[DirichletWindow[x]]Scope (4)
DirichletWindow[0.1]Translated and dilated Dirichlet window:
Plot[DirichletWindow[(x - 1) / 2], {x, -1, 3}, Exclusions -> None]2D Dirichlet window with a circular support:
Plot3D[DirichletWindow[Sqrt[x ^ 2 + y ^ 2]], {x, -1, 1}, {y, -1, 1}, PlotRange -> All, Exclusions -> None]Discrete Dirichlet window of length 15:
ListPlot[Array[DirichletWindow, 15, {-1 / 2, 1 / 2}], Filling -> Axis]Discrete 15×10 2D Dirichlet window:
ListPointPlot3D[Array[DirichletWindow[#1] DirichletWindow[#2]&, {15, 10}, {{-1, 1}}], Filling -> Axis]Applications (2)
Use a window specification to calculate sample PowerSpectralDensity:
proc = ARMAProcess[1, {.5}, {.3}, 1];
data = RandomFunction[proc, {50}];spec = PowerSpectralDensity[data, w, DirichletWindow];Compare to spectral density calculated without a windowing function:
sd = PowerSpectralDensity[data, w];sd === specThe Dirichlet window does not change the spectral density:
Plot[{sd, spec}, {w, -π, π}, 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 the window for the spectral estimator:
EstimatedProcess[data, ARMAProcess[1, 1], ProcessEstimator -> {"SpectralEstimator", "Window" -> DirichletWindow}]Properties & Relations (3)
DirichletWindow is equivalent to UnitBox:
PiecewiseExpand[DirichletWindow[x]] === PiecewiseExpand[UnitBox[x]]Fourier transform of the Dirichlet window:
f = FourierTransform[DirichletWindow[x], x, w]Power spectrum of the Dirichlet window:
LogLinearPlot[20 Log[10, Abs[f]], {w, .1, 80}]Discrete-time Fourier transform of the discrete Dirichlet window of length 11:
f = ListFourierSequenceTransform[Array[DirichletWindow, 11, {-1 / 2, 1 / 2}], ω, -5]//FullSimplifyf0 = N[f /. ω -> 0]LogLinearPlot[20 Log[10, Abs[f] / f0], {ω, .1, π}, GridLines -> Automatic]See Also
Related Guides
History
Text
Wolfram Research (2012), DirichletWindow, Wolfram Language function, https://reference.wolfram.com/language/ref/DirichletWindow.html.
CMS
Wolfram Language. 2012. "DirichletWindow." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DirichletWindow.html.
APA
Wolfram Language. (2012). DirichletWindow. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DirichletWindow.html
BibTeX
@misc{reference.wolfram_2026_dirichletwindow, author="Wolfram Research", title="{DirichletWindow}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/DirichletWindow.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_dirichletwindow, organization={Wolfram Research}, title={DirichletWindow}, year={2012}, url={https://reference.wolfram.com/language/ref/DirichletWindow.html}, note=[Accessed: 12-June-2026]}