如果输入数组为 {0,1,2,3,4,5,6,7},FFT 后的正确结果是多少
如果输入数组为 {0,1,2,3,4,5,6,7},谁能告诉我快速傅立叶变换后的正确结果是什么?
我得到了 {28,0,0,0,0,0,0,0}。这不正确吧?
只是想测试 C 中的 FFT 实现。
谢谢, 安德烈
can anyone tell me what is correct result after Fast Furier Transform, if input array is {0,1,2,3,4,5,6,7}.
I got {28,0,0,0,0,0,0,0}. It isn't correct right?
just want to test FFT implementation in C.
thanks,
Andrey
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
{0,1,2,3,4,5,6,7}
的 FFT 正确答案是The correct answer to a FFT for
{0,1,2,3,4,5,6,7}
is不,这是不正确的(单个非零输出元素意味着您的输入由常数值或单个复指数分量组成)。
为什么不使用现有的 FFT 实现(例如 FFTW 来提供参考结果?或者只是实现一个简单的 DFT?
No, it isn't correct (a single non-zero output element implies that your input consists of either a constant value, or a single complex-exponential component).
Why don't you use an existing FFT implementation, such as FFTW to provide a reference result? Or just implement a straightforward DFT?
根据 Wolfram Alpha 它是:
请注意,没有单一的“正确答案”,因为有多个DFT/FFT 的一种定义,每个定义之间的区别在于您为正向变换和反向变换包含的缩放因子。 (这个答案和之前接受的答案之间的区别只是
sqrt(8)
的比例因子)。According to Wolfram Alpha it's:
Note that there is no single "correct answer" as there is more than one definition of the DFT/FFT, the difference between each one being what scaling factor you include for forward and inverse transform. (The difference between this answer and the earlier accepted answer is just a scaling factor of
sqrt(8)
).Divij 答案假设输入 {0,1,2,3,4,5,6,7} 的大小=8,即:
{0,0i},{1,0i},{ 2,0i},{3,0i},{4,0i},{5,0i},{6,0i}
对于被视为大小 = 4 的二进制复数的输入,即:
{ 0,1i},{2,3i},{4,5i},{6,7i},
结果是:
Divij answer assumes that input {0,1,2,3,4,5,6,7} has size=8, that is:
{0,0i},{1,0i},{2,0i},{3,0i},{4,0i},{5,0i},{6,0i}
for input considered as binary complex with size=4, that is:
{0,1i},{2,3i},{4,5i},{6,7i},
the result is: