represents a Gaussian window function of x.
GaussianWindow[x,σ]
uses standard deviation σ.
GaussianWindow
represents a Gaussian window function of x.
GaussianWindow[x,σ]
uses standard deviation σ.
Details
- GaussianWindow 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.
- GaussianWindow[x,α] is equal to
. - GaussianWindow[x] is equivalent to GaussianWindow[x,3/10].
- GaussianWindow automatically threads over lists.
Examples
open all close allBasic Examples (3)
Shape of a 1D Gaussian window:
Plot[GaussianWindow[x], {x, -1, 1}, Exclusions -> None]Shape of a 2D Gaussian window:
Plot3D[GaussianWindow[x]GaussianWindow[y], {x, -1, 1}, {y, -1, 1}, PlotRange -> All, Exclusions -> None]Extract the continuous function representing the Gaussian window:
FunctionExpand[GaussianWindow[x]]Parameterized Gaussian window:
FunctionExpand[GaussianWindow[x, σ]]Scope (6)
GaussianWindow[0.1]Shape of a 1D Gaussian window using a specified standard deviation:
Plot[GaussianWindow[x, 0.2], {x, -1, 1}, Exclusions -> None]Variation of the shape as a function of the parameter σ:
Plot3D[GaussianWindow[x, σ], {σ, .1, 1}, {x, -1, 1}, Exclusions -> None]Translated and dilated Gaussian window:
Plot[GaussianWindow[(x - 1) / 2], {x, -1, 3}, Exclusions -> None]2D Gaussian window with a circular support:
Plot3D[GaussianWindow[Sqrt[x ^ 2 + y ^ 2]], {x, -1, 1}, {y, -1, 1}, PlotRange -> All, Exclusions -> None]Discrete Gaussian window of length 15:
ListPlot[Array[GaussianWindow, 15, {-1 / 2, 1 / 2}], Filling -> Axis]Discrete 15×10 2D Gaussian window:
ListPointPlot3D[Array[GaussianWindow[#1] GaussianWindow[#2]&, {15, 10}, {{-1 / 2, 1 / 2}}], Filling -> Axis]Applications (3)
Create a moving average filter of length 11:
a = ConstantArray[1 / 11, 11]Smooth the filter using a Gaussian window:
a2 = # / Total[#]&[a Array[GaussianWindow, 11, {-1 / 2, 1 / 2}]];Log-magnitude plot of the frequency spectrum of the filters:
LogLinearPlot[Evaluate[20Log[10, Abs@ListFourierSequenceTransform[#, ω]]& /@ {a, a2}], {ω, 0.0314, 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, GaussianWindow];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" -> GaussianWindow}]Properties & Relations (8)
GaussianWindow[x,∞] is equivalent to a Dirichlet window:
FunctionExpand[GaussianWindow[x, ∞]] == FunctionExpand[DirichletWindow[x]]The area under the Gaussian window:
area = Integrate[GaussianWindow[x], {x, -∞, ∞}]Normalize to create a window with unit area:
Plot[{GaussianWindow[x], GaussianWindow[x] / area}, {x, -1, 1}, Exclusions -> None]Fourier transform of the Gaussian window:
f = FourierTransform[GaussianWindow[x], x, w]Power spectrum of the Gaussian window:
LogLinearPlot[20 Log[10, Abs[f]], {w, .1, 80}]Fourier transform of the parametrized Gaussian window:
f = FourierTransform[GaussianWindow[x, σ], x, ω]Variation of the magnitude spectrum as a function of the parameter σ:
Plot3D[Abs@f, {ω, -30, 30}, {σ, 0.1, 1}, PlotRange -> All, PlotPoints -> 50]Discrete-time Fourier transform of the discrete Gaussian window of length 11:
f = ListFourierSequenceTransform[Array[GaussianWindow, 11, {-1 / 2, 1 / 2}], ω, -5]//FullSimplifyf0 = N[f /. ω -> 0]Plot[Abs@f / f0, {ω, 0, π}, PlotRange -> All]Power spectra for three different window lengths:
tab = Table[(f = ListFourierSequenceTransform[Array[GaussianWindow, n, {-1 / 2, 1 / 2}], ω];
f0 = N[f /. ω -> 0];
20Log10[Abs@f / f0]), {n, {5, 15, 45}}];LogLinearPlot[tab, {ω, 0.01, π}, PlotRange -> {5, -60}, PlotLegends -> {5, 15, 45}]Power spectra for three different values of the shape parameter σ:
tab = Table[(f = ListFourierSequenceTransform[Array[GaussianWindow[#, σ]&, 15, {-1 / 2, 1 / 2}], ω];
f0 = N[f /. ω -> 0];
20Log10[Abs@f / f0]), {σ, {0.2, 0.3, 1.}}];LogLinearPlot[tab, {ω, 0.05, π}, PlotRange -> {5, -60}, PlotLegends -> {0.2, 0.3, 1.}]Power spectra of the Gaussian and rectangular windows:
tab = Table[(f = ListFourierSequenceTransform[Array[win, 25, {-1 / 2, 1 / 2}], ω, -12];
f0 = Limit[f, ω -> 0.];
20Log10[Abs@f / f0]), {win, {GaussianWindow, DirichletWindow}}];LogLinearPlot[tab, {ω, 0.1, π}, PlotRange -> {5, -60}, PlotLegends -> {GaussianWindow, DirichletWindow}]Possible Issues (1)
2D sampling of Gaussian window will use a different standard deviation for each row of samples when passed as a symbol to Array:
Array[GaussianWindow, {30, 30}, {{-1 / 2, 1 / 2}}]//ListPlot3DArray[GaussianWindow[#1] GaussianWindow[#2]&, {30, 30}, {{-1 / 2, 1 / 2}}]//ListPlot3DRelated Guides
History
Text
Wolfram Research (2012), GaussianWindow, Wolfram Language function, https://reference.wolfram.com/language/ref/GaussianWindow.html.
CMS
Wolfram Language. 2012. "GaussianWindow." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/GaussianWindow.html.
APA
Wolfram Language. (2012). GaussianWindow. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GaussianWindow.html
BibTeX
@misc{reference.wolfram_2026_gaussianwindow, author="Wolfram Research", title="{GaussianWindow}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/GaussianWindow.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_gaussianwindow, organization={Wolfram Research}, title={GaussianWindow}, year={2012}, url={https://reference.wolfram.com/language/ref/GaussianWindow.html}, note=[Accessed: 12-June-2026]}