Skip to Main Content Skip to Search
Product Documentation

sigwin.tukeywin class - Package: sigwin

Construct Tukey window object

Description

sigwin.tukeywin creates a handle to a Tukey 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 N–point Tukey window:

where x is a N–point linearly spaced vector generated using linspace. The parameter α is the ratio of cosine-tapered section length to the entire window length with 0 ≤α≤1. For example, setting α=0.5 produces a Tukey window where 1/2 of the entire window length consists of segments of a phase-shifted cosine with period 2α=1. If you specify α≤0, an N-point rectangular window is returned. If you specify α≥1, a von Hann window (sigwin.hann) is returned.

Construction

H = sigwin.tukeywin returns a Tukey or cosine-tapered window object H of length 64 with Alpha parameter equal to 0.5.

H = sigwin.tukeywin(Length) returns a Tukey window object H of length Length with Alpha parameter equal to 0.5. Length requires a positive integer. Entering a positive noninteger value for Length rounds the length to the nearest integer.

H = sigwin.tukeywin(Length,Alpha) returns a Tukey window object with the ratio of the tapered section length to the entire window length Alpha. Alpha defaults to 0.5. As Alpha approaches zero, the Tukey window approaches a rectangular window. As Alpha approaches one, the Tukey window approaches a Hann window.

Properties

Length

Tukey window length. The window 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.

Alpha

The ratio of tapered window section to constant section. As a ratio, Alpha satisfies the inequality . As Alpha approaches zero, the Tukey window approaches a rectangular window. As Alpha approaches one, the Tukey window approaches a Hann window. Specifying Alpha less than zero or greater than one replaces Alpha with 0 and 1 respectively.

Methods

generateGenerates Tukey window
infoDisplay information about Tukey window object
winwriteSave Tukey 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

Default length N=64 Tukey window:

H=sigwin.tukeywin;
wvtool(H);
 

Generate length N=128 Tukey window, return values, and write ASCII file:

H=sigwin.tukeywin(128,1/4);
% Return window with generate
win=generate(H);
% Write ascii file in current directory
% with window values
winwrite(H,'tukeywin_128')

References

[1] Bloomfield P. Fourier Analysis of Time Series: An Introduction, New York: Wiley-Interscience, 2000, p.69.

See Also

sigwin | window | wvtool

Tutorials

How To

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS