Construct Blackman–Harris window object
sigwin.blackmanharris creates a handle to a Blackman-Harris 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 symmetric Blackman-Harris window of length N:
The following equation defines the periodic Blackman-Harris window of length N:
The following table lists the coefficients:
H = sigwin.blackmanharris returns a Blackman-Harris window object H of length 64.
H = sigwin.blackmanharris(Length) returns a Blackman-Harris window object H of 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.
Blackman-Harris window length. The window length requires 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.
The type of window returned as one of 'symmetric' or 'periodic'. The default is 'symmetric'. A symmetric window exhibits perfect symmetry between halves of the window. Setting the SamplingFlag property to 'periodic' results in a N-periodic window. The equations for the Blackman-Harris window differ slightly based on the value of the SamplingFlag property. See Description for details.
|generate||Generates Blackman–Harris window|
|info||Display information about Blackman–Harris window object|
|winwrite||Save Blackman–Harris window in ASCII file|
Handle. To learn how copy semantics affect your use of the class, see Copying Objects in the MATLAB® Programming Fundamentals documentation.
Default length N=64 Blackman-Harris window:
Generate length N=128 periodic Blackman-Harris window, return values, and write ASCII file:
H=sigwin.blackmanharris(128); H.SamplingFlag = 'periodic'; % Return window with generate win=generate(H); % Write ASCII file in current directory % with window values winwrite(H,'blackmanharris_128')
Harris, F. J. "On the Use of Windows for Harmonic Analysis with the Discrete Fourier Transform," Proceedings of the IEEE®.. Vol. 66, 1978.