ftwindow: Fourier transform windows

View source: R/seewave.r

ftwindowR Documentation

Fourier transform windows

Description

Generates different Fourier Transform windows.

Usage

ftwindow(wl, wn = "hamming",
        correction = c("none", "amplitude", "energy"))

Arguments

wl

window length

wn

window name: bartlett, blackman, flattop, hamming, hanning, or rectangle (by default hamming).

correction

a character vector of length 1 to apply an amplitude ("amplitude") or an energy ("energy") correction to the FT window. By default no correction is applied ("none").

Value

A vector of length wl.

Note

Try the example to see windows shape.

Author(s)

Jerome Sueur sueur@mnhn.fr

References

Harris, F.J., 1978. On the use of windows for harmonic analysis with the discrete Fourier Transform. Proceedings of the IEEE, 66(1): 51-83.

See Also

covspectro, dfreq, meanspec, spec, spectro, spectro3D

Examples

a<-ftwindow(512)
b<-ftwindow(512,wn="bartlett")
c<-ftwindow(512,wn="blackman")
d<-ftwindow(512,wn="flattop")
e<-ftwindow(512,wn="hanning")
f<-ftwindow(512,wn="rectangle")
all<-cbind(a,b,c,d,e,f)
matplot(all,type="l",col=1:6,lty=1:6)
legend(legend=c("hamming","bartlett","blackman","flattop","hanning","rectangle"),
x=380,y=0.95,col=1:6,lty=1:6,cex=0.75)

seewave documentation built on Oct. 19, 2023, 5:07 p.m.

Related to ftwindow in seewave...