时间序列数据的FFT

时间:2019-04-13 00:18:06

标签: matlab time-series signal-processing fft

  1. 每月连续采集265年的数据集的采样频率是多少?
  2. 如何通过查看FFT来确定重复率?

我将采样周期设为30 * 24 * 60 * 60秒,因为每月仅记录一次数据!当我绘制FFT时,我得到的主频为3.28x10 ^ -8 Hz。现在我该怎么解释?怎么说这个信号多久出现一次?

The dataset is here

datax=VarName1;
datay=VarName2;
datay_mean=datay-mean(datay);
class(datax)
dataxx=datetime(datax);
class(dataxx)
figure;
plot(dataxx,datay)
datetick('x', 'keepticks','keeplimits')
title('actual plot of temp in years')

Y = fft(datay_mean);
L = length(datay_mean); 

T = 30*24*60*60 
Fs = 1/(T);

f_adj1=(0:L-1)/L;
figure;
plot(f_adj1,abs(Y/L))                        
title('Single-Sided Amplitude Spectrum of X(t)')
xlabel('normalized (freq)')
ylabel('|P1(f)|')

f_adj2=(0:L-1)*Fs/L;
figure;
plot(f_adj2,abs(Y/L))                         
title('Single-Sided Amplitude Spectrum of X(t)')
xlabel('(freq)')
ylabel('|P1(f)|')

0 个答案:

没有答案