sigwin.barthannwin class

Package: sigwin

Construct Bartlett-Hanning window object

Description

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

w(x)=0.620.48|x|+0.38cos(2πx)1/2x1/2

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

Construction

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

H = sigwin.barthannwin(Length) returns a modified Bartlett-Hanning 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-Hanning 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-Hanning window
infoDisplay information about modified Bartlett-Hanning window object
winwriteSave Bartlett 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

Default length N=64 modified Bartlett-Hanning window:

H=sigwin.barthannwin;
wvtool(H); 

Generate length N=128 modified Bartlett-Hanning window, return values, and write ASCII file with window values:

H=sigwin.barthannwin(128);
% Return window with generate
win=generate(H);
% Write ASCII file in current directory
% with window values
winwrite(H,'barthannwin_128')

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.

Was this topic helpful?