({{, (RefLink[GaussianWindow, paclet:ref/GaussianWindow])[x]
represents a Gaussian window function of x.}, {, (RefLink[GaussianWindow, paclet:ref/GaussianWindow])[x,σ]
uses standard deviation σ.}})

OpenersNotesSection(Spacer1)Details

(RefLink[GaussianWindow, paclet:ref/GaussianWindow])[x,α] is equal to ({{{, ({{(e^(-((x^2)/(2 (α^2))))), -(1/2)≤x≤(1/2)}, {0, (Abs[x])>(1/2)}})}}).

(RefLink[GaussianWindow, paclet:ref/GaussianWindow])[x] is equivalent to (RefLink[GaussianWindow, paclet:ref/GaussianWindow])[x,3/10].

(RefLink[GaussianWindow, paclet:ref/GaussianWindow]) automatically threads over lists.

OpenersPrimaryExamplesSection(Spacer1)Examples  (16)

OpenersExampleSection0(Spacer1)Basic Examples  (3)

Shape of a 1D Gaussian window:

Plot[GaussianWindow[x],{x,-1,1}]

Shape of a 2D Gaussian window:

Plot3D[GaussianWindow[x]GaussianWindow[y],{x,-1,1},{y,-1,1},PlotRange->All]

Extract the continuous function representing the Gaussian window:

FunctionExpand[GaussianWindow[x]]

Parameterized Gaussian window:

FunctionExpand[GaussianWindow[x,σ]]

OpenersExampleSection1(Spacer1)Scope  (6)

Shape of a 1D Gaussian window using a specified standard deviation:

Plot[GaussianWindow[x,0.2],{x,-1,1}]

Variation of the shape as a function of the parameter σ:

Plot3D[GaussianWindow[x,σ],{σ,.1,1},{x,-1,1}]

Translated and dilated Gaussian window:

Plot[GaussianWindow[(x-1)/2],{x,-1,3}]

2D Gaussian window with a circular support:

Plot3D[GaussianWindow[Sqrt[x^2+y^2]],{x,-1,1},{y,-1,1},PlotRange->All]

Evaluate numerically:

GaussianWindow[0.1]

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]

OpenersExampleSection3(Spacer1)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 (RefLink[PowerSpectralDensity, paclet:ref/PowerSpectralDensity]):

proc=ARMAProcess[1,{.5},{.3},1];
data=RandomFunction[proc,{50}];

Calculate the spectrum:

spec=PowerSpectralDensity[data,w,GaussianWindow];

Compare to spectral density calculated without a windowing function:

sd=PowerSpectralDensity[data,w];

sd===spec

The 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}]

OpenersExampleSection4(Spacer1)Properties & Relations  (3)

(RefLink[GaussianWindow, paclet:ref/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}]

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}]

OpenersExampleSection5(Spacer1)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 (RefLink[Array, paclet:ref/Array]):

Array[GaussianWindow,{30,30},{{-1/2,1/2}}]//ListPlot3D

Use a pure function instead:

Array[GaussianWindow[#1] GaussianWindow[#2]&,{30,30},{{-1/2,1/2}}]//ListPlot3D

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[GaussianMatrix, paclet:ref/GaussianMatrix])  ▪  (RefLink[Array, paclet:ref/Array])  ▪  (RefLink[TukeyWindow, paclet:ref/TukeyWindow])  ▪  (RefLink[BartlettWindow, paclet:ref/BartlettWindow])  ▪  (RefLink[BlackmanWindow, paclet:ref/BlackmanWindow])  ▪  (RefLink[HannWindow, paclet:ref/HannWindow])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Filter-Design Window Functions, paclet:guide/WindowFunctions])}})}})