フーリエ変換資料

x<-seq(from=0,to=2*pi,length.out=100)
z<-cos(2*x)+2*cos(5*x)
par(mfcol=c(2,2))
plot(z,type="l")
y<-fft(z)
plot(Re(y),type="l")
plot(Re(y[1:10]),type="l")
a<-fft(y, inverse = TRUE) / length(y)
plot(Re(a),type="l")