represents an exact flat top window function of x.
FlatTopWindow
represents an exact flat top window function of x.
Details
- FlatTopWindow 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.
- FlatTopWindow[x] is equal to
. - FlatTopWindow automatically threads over lists.
Examples
open all close allBasic Examples (3)
Shape of a 1D exact flat top window:
Plot[FlatTopWindow[x], {x, -1, 1}, PlotRange -> All]Shape of a 2D exact flat top window:
Plot3D[FlatTopWindow[x]FlatTopWindow[y], {x, -1, 1}, {y, -1, 1}, PlotRange -> All]Extract the continuous function representing the exact flat top window:
FunctionExpand[FlatTopWindow[x]]Scope (4)
FlatTopWindow[0.1]Translated and dilated exact flat top window:
Plot[FlatTopWindow[(x - 1) / 2], {x, -1, 3}, PlotRange -> All]2D exact flat top window with a circular support:
Plot3D[FlatTopWindow[Sqrt[x ^ 2 + y ^ 2]], {x, -1, 1}, {y, -1, 1}, PlotRange -> All]Discrete exact flat top window of length 15:
ListPlot[Array[FlatTopWindow, 15, {-1 / 2, 1 / 2}], Filling -> Axis]Discrete 15×10 2D flat top window:
ListPointPlot3D[Array[FlatTopWindow[#1] FlatTopWindow[#2]&, {15, 10}, {{-1 / 2, 1 / 2}}], Filling -> Axis, PlotRange -> All]Applications (3)
Create a moving average filter of length 21:
h = ConstantArray[1 / 21., 21]Taper the filter using a flat top window:
w = Array[FlatTopWindow, Length[h], {-1 / 2, 1 / 2}];
fir = w h / Total[w h];Log-magnitude plot of the power spectra of the filters:
LogLinearPlot[Evaluate[20Log10[Abs@ListFourierSequenceTransform[#, ω]]& /@ {h, fir}], {ω, 0.1, Pi}, GridLines -> Automatic]Use a window specification to calculate sample PowerSpectralDensity:
proc = ARMAProcess[1, {.5}, {.3}, 1];
data = RandomFunction[proc, {50}];spec = PowerSpectralDensity[data, w, FlatTopWindow];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" -> FlatTopWindow}]Properties & Relations (2)
The area under the exact flat top window:
area = Integrate[FlatTopWindow[x], {x, -∞, ∞}]Normalize to create a window with unit area:
Plot[{FlatTopWindow[x], FlatTopWindow[x] / area}, {x, -1, 1}, PlotRange -> All]Fourier transform of the exact flat top window:
f = FourierTransform[FlatTopWindow[x], x, w]Power spectrum of the exact flat top window:
LogLinearPlot[20 Log[10, Abs[f]], {w, .1, 100}]Related Guides
History
Text
Wolfram Research (2012), FlatTopWindow, Wolfram Language function, https://reference.wolfram.com/language/ref/FlatTopWindow.html.
CMS
Wolfram Language. 2012. "FlatTopWindow." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FlatTopWindow.html.
APA
Wolfram Language. (2012). FlatTopWindow. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FlatTopWindow.html
BibTeX
@misc{reference.wolfram_2026_flattopwindow, author="Wolfram Research", title="{FlatTopWindow}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/FlatTopWindow.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_flattopwindow, organization={Wolfram Research}, title={FlatTopWindow}, year={2012}, url={https://reference.wolfram.com/language/ref/FlatTopWindow.html}, note=[Accessed: 12-June-2026]}