-1
我正在对随机二进制数据执行FFT。我对y轴缩放因子是什么感到困惑。我的随机数据的重复频率为400Hz,或者测量间隔为0.0025秒。数据点的数量是12489.FFT y级混淆 - Python scipy
以下作品的代码,并给出了50左右
我的问题的平均振幅:
- 是什么y.size究竟做这个背景?
- 在12489个随机二进制点上执行FFT的预期幅度是多少? (我明白这个问题是专门针对这里的,但是如果能理解我会很感激这个帮助)。
工作代码:(如果您希望将其复制并粘贴到Python来看看)
from numpy import *
import pylab as P
import numpy as N
import scipy as S
import array
import scipy.fftpack
from random import *
#Produce random binary data
x = N.linspace(0,12489,12489)
randBinList = lambda n: [randint(0,1) for b in range(1,n+1)]
y = randBinList(12489)
y = asarray(y)
#Perform an FFT
FFT = abs(S.fft(y))
freqs = S.fftpack.fftfreq(y.size,0.0025)
#What does y.size do???
x_range = freqs[(freqs>0)]
y_range = FFT[(freqs>0)]
P.plot(x_range,y_range,'.r')
P.show()
你整理出来了吗? – tacaswell 2013-10-05 01:16:58