Generates a Hanning Window.
GHANNING(N, spacing, alpha, "sym")
N 
 
An integer, the number of points to generate. 

spacing 
 
A real, the spacing (delta x) between points. 

alpha 
 
Optional. Scaling parameter. Defaults to 0.5. 

"sym" 
 
Optional. A string, the symmetry flag.

A series.
ghanning(100,.01)
creates a 100point symmetric Hanning window with points spaced with an interval of 0.01 by the following formula:
where n is the n^{th} point (1 <= n <= N) and N = L+1 where L is the number of points to generate. The leading zero is removed. The spacing between samples is set to 0.01.
ghanning(100,.01, "periodic")
creates a 100point periodic Hanning window with points spaced with an interval of 0.01 by the following formula:
where n is the n^{th} point (1 <= n <= N) and N = L where L is the number of points to generate. The spacing between samples is set to 0.01. The leading zero is preserved.
ghanning(100,.01, "direct")
creates a 100point direct Hanning window with points spaced with an interval of 0.01 by the following formula:
where n is the n^{th} point (1 <= n <= N) and N is the number of points to generate. The spacing between samples is set to 0.01. The leading and trailing zeros are preserved.
The "sym" flag controls the window symmetry as follows:
"Symmetric" sets the last point to be the same value as the first point. For an N point symmetric window, a N+1 point periodic window is effectively created and the leading zero is removed.
"Periodic" or "iso" creates a periodic window function useful in spectrum analysis applications where the starting zero is preserved and the trailing zero is removed. "Periodic" or "iso" conforms to the ISO 184311 standard for windowing functions.
The Hamming, Hanning, Flattop and Blackman windows are part of the family of cosine window functions. The ISO standard periodic form of these windowing functions are defined by:
where K is the number of window coefficients and N is the length of the window. The direct form of the window can be constructed by setting N to
For the default Hanning window:
Use HANNING to automatically create and multiply a Hanning window with a series. For example:
hanning(W2)
multiplies Window 2 with a Hanning window of the same length and spacing as the series in W2.
The Hanning window is sometimes referred to as a Hann window.
Blackman, Flattop, Hamming, Hanning and Kaiser Windows are useful in creating FIR filters and in preprocessing series for FFT calculations.
Oppenheim and Schafer.
Digital Signal Processing
Prentice Hall, 1975
Digital Signal Processing Committee
Programs for Digital Signal Processing
I.E.E.E. Press, 1979