search for: whenfast

Displaying 1 result from an estimated 1 matches for "whenfast".

2020 Oct 19
1
spec.pgram returns different spectra when fast=TRUE and the number of samples is odd
Dear all, This is potentially a bug in spec.pgram, when the number of samples is odd,spec.pgramreturns a different result withfast = TRUE, the example below contains the two varieties with a reference spectrum calculated manually. the number of returned spectra is also larger (50 compared to 49) whenfast = TRUE x <- rnorm( 99 ) plot(spec.pgram(x, taper = 0 , detrend = FALSE , plot = FALSE , fast = FALSE )$spec, ty = 'l' ) lines(spec.pgram(x, taper = 0 , detrend = FALSE ,plot = FALSE , fast = TRUE )$spec, col = 'red' ) lines(((abs(fft(x))^ 2 )[ 2 : 50...