def window_bartlett_hann(N):
if N == <NUM_LIT:1>:<EOL><INDENT>return ones(<NUM_LIT:1>)<EOL><DEDENT>n = arange(<NUM_LIT:0>, N)<EOL>a0 = <NUM_LIT><EOL>a1 = <NUM_LIT><EOL>a2 = <NUM_LIT><EOL>win = a0 -  a1 *abs(n/(N-<NUM_LIT:1.>)-<NUM_LIT:0.5>) -a2 * cos(<NUM_LIT:2>*pi*n/(N-<NUM_LIT:1.>))<EOL>return win<EOL>
r"""Bartlett-Hann window

    :param N: window length

    .. math:: w(n) = a_0 + a_1 \left| \frac{n}{N-1} -\frac{1}{2}\right| - a_2 \cos \left( \frac{2\pi n}{N-1} \right)

    with :math:`a_0 = 0.62`, :math:`a_1 = 0.48` and :math:`a_2=0.38`

    .. plot::
        :width: 80%
        :include-source:

        from spectrum import window_visu
        window_visu(64, 'bartlett_hann')

    .. seealso:: :func:`create_window`, :class:`Window`