Power spectral density using Welch's method.

pwelch(x, sRate, points = 0, overlap = 0, padding = 0, show = TRUE)

Arguments

x

Signal vector.

sRate

Sample rate of the signal.

points

todo

overlap

todo

padding

todo

show

todo

Value

peridodogram plotted or raw

References

Welch, P. “The Use of Fast Fourier Transform for the Estimation of Power Spectra: A Method Based on Time Averaging over Short, Modified Periodograms.” IEEE Transactions on Audio and Electroacoustics 15, no. 2 (June 1967): 70–73. https://doi.org/10.1109/TAU.1967.1161901.

Examples

x <- sin(c(1:10000))
psd <- pwelch(sin(c(1:10000)), 200)

head(psd)
#>    hz       psd
#> 1 0.0 -16.96041
#> 2 0.2 -16.96030
#> 3 0.4 -16.95997
#> 4 0.6 -16.95942
#> 5 0.8 -16.95865
#> 6 1.0 -16.95767