function w = blackman(N)
    // Periodic Blackman window
    // Usage:
    //       w = blackman(N)
    // Where 
    //       N: Length of Blackman window
    //       w: Vector containing the periodic Blackman window
    //
    // NOTE: The symmetric Blackman window can be obtained as
    //       ws = [blackman(N-1), 0]
    //     
    // ---------------------------------- 
    w = 0.42 - 0.5*cos(2*%pi*(0:N-1)/N) + 0.08*cos(4*%pi*(0:N-1)/N);
endfunction
