sigwin.hamming Class
Namespace: sigwin
Construct Hamming window object
Description
Note
The use of sigwin.hamming
is not recommended. Use hamming
instead.
sigwin.hamming
creates a handle to a Hamming
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.
The following equation defines the Hamming window of length N
:
where M
is N/2
for N
even
and (N+1)/2
for N
odd.
The second half of the symmetric Hamming window is obtained by flipping the first half around the midpoint. The symmetric option is the preferred method when using a Hamming window in FIR filter design.
The periodic Hamming 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 Hamming window in spectral analysis because the discrete Fourier transform assumes periodic extension of the input vector.
Construction
H = sigwin.hamming
returns a symmetric
Hamming window object H
of length 64.
H = sigwin.hamming(
returns a symmetric
Hamming window object with length Length
)Length
.
Length
must be a positive integer. Entering a positive
noninteger value for Length
rounds the length to the nearest
integer. Entering a 1 for Length
results in a window with a
single value of 1.
H = sigwin.hamming(
returns
a Hamming window with sampling Length
,SamplingFlag
)Sampling_Flag
.
The SamplingFlag
can be either 'symmetric'
or 'periodic'
.
Properties
| Hamming window length. The window length must be a positive
integer. Entering a positive noninteger value for |
|
|
Methods
generate | Generates Hamming window |
info | Display information about Hamming window object |
winwrite | Save Hamming window in ASCII file |
Copy Semantics
Handle. To learn how copy semantics affect your use of the class, see Copying Objects in the MATLAB® Programming Fundamentals documentation.
Examples
References
Oppenheim, Alan V., and Ronald W. Schafer. Discrete-Time Signal Processing. Upper Saddle River, NJ: Prentice Hall, 1989.