我试图在时间序列数据上应用FFT
函数以使其在R中变得平滑:
采样时间= 16 days
时间段= 1 year
输入值:
x <-c(5292,5324,4560,5479,5426,5836,6020,6163,5582,5530,6656,8473,8685,8107,8296,7943,7358,6476,5557,5057,4962,5038,5592)
结果为complex number
,形式为ai+b
:
fft(x)
[1] 143412.0000+ 0.0000i -16172.9339+5204.3716i 3840.8982-7231.4595i
[4] -168.9544+4101.8545i 3964.4752+1373.7454i -2129.1013- 412.7717i
[7] 2043.0532+1519.1651i -92.0472- 889.5815i 659.5677+ 106.7809i
[10] -790.6303- 560.5901i -421.6175- 712.4884i -1580.7096- 338.9213i
[13] -1580.7096+ 338.9213i -421.6175+ 712.4884i -790.6303+ 560.5901i
[16] 659.5677- 106.7809i -92.0472+ 889.5815i 2043.0532-1519.1651i
[19] -2129.1013+ 412.7717i 3964.4752-1373.7454i -168.9544-4101.8545i
[22] 3840.8982+7231.4595i -16172.9339-5204.3716i
现在,我想将数据平滑到2 harmonics,
,并且不知道如何在R中继续进行。我已在互联网上进行了彻底搜索,但找不到答案。很感谢任何形式的帮助。谢谢您的宝贵时间。