A window function is a mathematical function that applies a weighting (often between 0 and 1) to each discrete time series sample in a finite set^{[1]}. It should be noted that window functions can be applied in the frequency-domain, though this is a somewhat *convoluted* process and beyond the scope of this article. As a simple example, assume the finite set *x* of length *N*. If each value within *x* is assigned a weighting of 1 then it can be said that a new set *y* has been created to which the rectangular window function *w* (also of length *N*) has been applied:

\[y(n) = x(n) . w(n)\qquad0 \leq n \leq N\]

The above equation essentially states that a new set should be created whereby each value at index *n* is the product of the values at the *n*^{th} index of the sample set *x* and window function *w*. Figure 1 depicts both an unmodified sine wave and a sine wave to which a rectangular window has been applied – they are analogous to each other.