Engee documentation

tukeywin

The Tukey window (tapering cosine).

Library

EngeeDSP

Syntax

Function call

  • w = tukeywin(L,r) — returns L-a point window of Tukey with a cosine fraction r.

Arguments

Input arguments

# L — window length

+ positive integer

Details

The window length specified as a positive integer.

If you set L as a non-integer number, the function will round it to the nearest integer value.
Data types

Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64

# r — cosine fraction

+ 0.5 (by default) | real scalar

Details

A cosine fraction given as a real scalar. The Tukey window is a rectangular window in which the first and last r/2 percentages of samples are equal to fractions of cosine. For example, when r = 0.5 it turns out a Tukey window in which 1/2 The entire length of the window consists of segments of a phase-shifted cosine with a period 2r = 1. If you set r ≤ 0, returns L-dotted rectangular window. If you set r ≥ 1, returns L- von Hahn point window.

Data types

Float32, Float64

Output arguments

# w — Tukey’s window

+ column vector

Details

The Tukey window returned as a column vector.

Algorithms

The following equation defines -Tuki point window:

Where — a linearly spaced vector from points. Parameter — the ratio of the length of the cosine section to the total length of the window, where . For example, when it turns out a Tukey window in which The entire length of the window consists of segments of a phase-shifted cosine with a period . If you ask , returns -dotted rectangular window. If you ask , returns - von Hahn point window.

Literature

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