Windowfunctions: Windowfunctions

Description Details Value Examples

Description

Some typical windowfunctions are defined below:

Details

win.cos()

cosine window

win.tukey()

Tukey window

win.hann()

Hann window

win.nutt()

Nutt window

A window function weights a given dataset in a way, that the new data set is coerced to be periodic. This method reduces the leakage effects of the discrete Fourier transform.

Value

All window functions return a wighting vector with the same length as the provided data vector.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
y <- 1:100
y_cos <- y * win.cos(y)
y_tuk <- y * win.tukey(y)
y_han <- y * win.hann(y)

# Plot the original data
plot(y,main="Effect of window functions")
legend("topleft",c("original","cos","tukey","han"),pch=c(1,16,17,18))
points(y_cos,pch=16)
points(y_tuk,pch=17)
points(y_han,pch=18)

spectral documentation built on March 29, 2021, 5:10 p.m.