Main Content

sigwin.barthannwin Class

Namespace: sigwin

Construct modified Bartlett-Hann window object

Description

Note

The use of sigwin.barthannwin is not recommended. Use barthannwin instead.

sigwin.barthannwin creates a handle to a modified Bartlett-Hann 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 a modified Bartlett-Hann window of length N:

w(x)=0.620.48|x|+0.38cos2πx,12x12

where x is an N-point linearly spaced vector over the interval [1/2, 1/2].

Construction

H = sigwin.barthannwin returns a modified Bartlett-Hann window object H of length 64.

H = sigwin.barthannwin(Length) returns a modified Bartlett-Hann window object H of length Length. 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.

Properties

Length

Modified Bartlett-Hann 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.

Methods

generateGenerates modified Bartlett-Hann window
infoDisplay information about modified Bartlett-Hann window object
winwriteSave modified Bartlett-Hann window object values 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

collapse all

Generate a modified Bartlett-Hann window of length N = 16. Return its values as a column vector. Show information about the window object. Display the window.

H = sigwin.barthannwin(16);

win = generate(H)
win = 16×1

         0
    0.0649
    0.1897
    0.3586
    0.5477
    0.7300
    0.8794
    0.9757
    0.9757
    0.8794
      ⋮

wininfo = info(H)
wininfo = 3x23 char array
    'Bartlett-Hanning Window'
    '-----------------------'
    'Length  : 16           '

wvtool(H)

References

Yeong, H. H., and Pearce, J. A. “A New Window and Comparison to Standard Windows.” IEEE® Transactions on Acoustics, Speech and Signal Processing, Vol. 37, 1989, pp. 298–301.