CosineWindow

CosineWindow[x]

represents a cosine window function of x.

CosineWindow[x,α]

uses the exponent α.

Details

  • CosineWindow 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.
  • CosineWindow[x,α] is equal to for and 0 otherwise.
  • CosineWindow[x] is equivalent to CosineWindow[x,1].
  • CosineWindow automatically threads over lists.

Examples

open allclose all

Basic Examples  (3)

Shape of a 1D cosine window:

Shape of a 2D cosine window:

Extract the continuous function representing the cosine window:

Parameterized cosine window:

Scope  (6)

Evaluate numerically:

Shape of a 1D cosine window using a specified exponent:

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

Translated and dilated cosine window:

2D cosine window with a circular support:

Discrete cosine window of length 15:

Discrete 15×10 2D cosine window:

Applications  (3)

Create a moving-average filter of length 11:

Taper the filter using a cosine window:

Log-magnitude plot of the power spectra of the two 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 the window smooths the spectral density:

Compare to the theoretical spectral density of the process:

Use a window specification for time series estimation:

Specify the window for the spectral estimator:

Properties & Relations  (3)

CosineWindow[x,0] is equivalent to a Dirichlet window:

The area under the cosine window:

Normalize to create a window with unit area:

Fourier transform of the cosine window:

Power spectrum of the cosine window:

Possible Issues  (1)

2D sampling of cosine window uses a different exponent for each row of samples when passed as a symbol to Array:

Use a pure function instead:

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2023_cosinewindow, author="Wolfram Research", title="{CosineWindow}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/CosineWindow.html}", note=[Accessed: 19-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_cosinewindow, organization={Wolfram Research}, title={CosineWindow}, year={2012}, url={https://reference.wolfram.com/language/ref/CosineWindow.html}, note=[Accessed: 19-March-2024 ]}