Generates a Flattop Window.
GFLATTOP(N, spacing, type, "sym")
N 
 
An integer, the number of points to generate. 

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

type 
 
Optional. An integer, the generation method.


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

A series.
gflattop(100, .01)
generates a periodic 100point Flattop Window using the following 4 point formula:
where n is the n^{th} point (1 <= n <= N) and N is 100, the number of points. The spacing between samples is set to 0.01.
The Flattop window preserves the amplitude of a series at the expense of frequency resolution. It will accurately measure the amplitude of a series at any frequency, even if the frequency lies between FFT bins.
The periodic flattop window is constructed by the formula of the form:
where N is the length of the window and n is the n^{th} point (1 <= n <= N).
The symmetric flattop window is constructed by the formula of the form:
where N is the length of the window and n is the n^{th} point (1 <= n <= N).
The type parameter specifies the values of the flattop window coefficients. The following types are supported:
For type 0, ISO 184311 (default):
For type 1, two point flattop window:
For type 2, alternate four point flattop window:
For type 3, three point HP P301 flattop window:
For type 4, HP four point window:
For type 5, modified HP P401 five point window:
For type 6, Rohde & Schwartz four point window:
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 N1 point periodic window is effectively created and the N^{th} point is set to the first point.
"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 184311 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 symmetric form of the window can be constructed by setting N to N1.
Because the ISO 184311 standard specifies a periodic flattop window, GFLATTOP uses "periodic" as the default for the "sym" flag.
Use FLATTOP to automatically create and multiply a Flattop window with a series. For example:
flattop(W1)
multiplies Window 1 with a Flattop window of the same length and spacing as the series in W1.
Blackman, Flattop, Hamming, Hanning and Kaiser Windows are useful in creating FIR filters and in preprocessing series for FFT calculations.