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)\right)&={\tfrac {1}{2}}\left[1-\cos \left({\tfrac {2\pi n}{N}}\right)\right]\\&=\sin ^{2}\left({\tfrac {\pi n}{N}}\right)\end{aligned}}\right\},\quad 0\leq n\leq N,}](./83b723018aa0923be6327c07fed4753f1ed7d033.svg)
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.