W_hanningmultiplies the sequence in arrayAby the Hanning window function and returns the product in arrayB. ArrayAis unmodified. IfNis the number of elements in the arrayAandkis the position in the arrayB, the formula for the window function,wk, is
In the above formula,kranges in value from 0 toN- 1.
The Hanning window is the same as the cosine window with the parameterrset to 0.5.
Hanning window forN=128
Errors
W_hanningcauses an HTBasic error if its arguments are not of the types listed in the USAGE section, above, or ifBcontains fewer elements thanA.