Construct flat top window object
The use of
sigwin.flattopwin creates a handle to a flat
top window object for use in spectral analysis and FIR filtering by
the window method. Object methods enable workspace import and ASCII
file export of the window values.
H = sigwin.flattopwin returns a flat top
H of length 64 with symmetric sampling.
H = sigwin.flattopwin( returns a flat top window object of length
Length with symmetric sampling.
Length must be a positive integer. Entering a positive noninteger value
Length rounds the length to the nearest
integer. Entering a 1 for
in a window with a single value of 1.
H = sigwin.flattopwin( returns a flat
top window object
H of length
Length with sampling
SamplingFlag can be either
Flat top window length. Must be a positive integer. Entering
a positive noninteger value for
|generate||Generates flat top window|
|info||Display information about flat top window object|
|winwrite||Save flat top window in ASCII file|
The following equation defines the flat top window of length
N even and
The second half of the symmetric flat top window is obtained by flipping the first half around the midpoint. The symmetric option is the preferred method when using a flat top window in FIR filter design by the window method.
The periodic flat top window is constructed by extending the desired window length by one sample, constructing a symmetric window, and removing the last sample. The periodic version is the preferred method when using a flat top window in spectral analysis because the discrete Fourier transform assumes periodic extension of the input vector.
The coefficients are listed in the following table:
Handle. To learn how copy semantics affect your use of the class, see Copying Objects in the MATLAB® Programming Fundamentals documentation.
N = 64 symmetric flat top
H = sigwin.flattopwin; wvtool(H)
N = 128 periodic flat top
window, return values, and write ASCII file:
H = sigwin.flattopwin(128,'periodic'); % Return window with generate win = generate(H); % Write ascii file in current directory % with window values winwrite(H,'flattopwin_128')
Oppenheim, Alan V., and Ronald W. Schafer. Discrete-Time Signal Processing. Upper Saddle River, NJ: Prentice Hall, 1989.