cspec (version 0.1.2)

taperDFT: Tapered DFT

Description

Function to calculate the tapered DFT.

Usage

taperDFT(x, freq = 2 * pi * (1:length(x))/length(x), regularization.type = "1", p = 0.1)

Arguments

x

time series vector.

freq

frequency vector.

regularization.type

character. if "1": sum of the taper equals to n, if "2": square sum of the taper equals to n. Default is "1".

p

proprotion of taper.

Value

Complex valued tapered DFT vector.

Details

Tapered DFT. The default taper is a Tukey's (or Cosine-bell) taper.

See Also

fft2

Examples

Run this code
# NOT RUN {
set.seed(123)
x <- arima.sim(model=list(ar=0.7), n=100)
v <- taperDFT(x)
# }

Run the code above in your browser using DataCamp Workspace