One-sided rFFT-based periodogram. Inner bins are doubled to fold
negative-frequency power into the one-sided spectrum.
Usage
morie_dsp_psd_periodogram(x, fs = 1)
Arguments
- x
Numeric vector.
- fs
Sampling frequency (Hz). Default 1.
Value
List with freqs and psd, both length floor(N/2)+1.
References
Rangayyan & Krishnan (2015), Ch. 6, sec. 6.4.
Examples
fs <- 1024; t <- seq.int(0, 1023) / fs
x <- cos(2 * pi * 50 * t)
out <- morie_dsp_psd_periodogram(x, fs = fs)
out$freqs[which.max(out$psd)]
#> [1] 50