The Hann function is named after the Austrian meteorologist Julius von Hann. It is a window function used to perform Hann smoothing or hanning. The function, with length
and amplitude
is given by:

For digital signal processing, the function is sampled symmetrically (with spacing
and amplitude
):
![{\displaystyle \left.{\begin{aligned}w[n]=L\cdot w_{0}\left({\tfrac {L}{N}}(n-N/2) ight)&={\tfrac {1}{2}}\left[1-\cos \left({\tfrac {2\pi n}{N}} ight) ight]\\&=\sin ^{2}\left({\tfrac {\pi n}{N}} ight)\end{aligned}} ight\},\quad 0\leq n\leq N,}](https://wikimedia.org/api/rest_v1/media/math/render/svg/83b723018aa0923be6327c07fed4753f1ed7d033)
which is a sequence of
samples, and
can be even or odd. It is also known as the raised cosine window, Hann filter, von Hann window, Hanning window, etc.