如果输入数组为 {0,1,2,3,4,5,6,7},FFT 后的正确结果是多少

发布于 2024-11-11 07:33:48 字数 137 浏览 4 评论 0原文

如果输入数组为 {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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

堇年纸鸢 2024-11-18 07:33:48

{0,1,2,3,4,5,6,7} 的 FFT 正确答案是

{28.0000 + 0.0000i, 
-4.0000 + 9.6569i,
-4.0000 + 4.0000i,
-4.0000 + 1.6569i,
-4.0000 + 0.0000i, 
-4.0000 - 1.6569i,
-4.0000 - 4.0000i,
-4.0000 - 9.6569i}

The correct answer to a FFT for {0,1,2,3,4,5,6,7} is

{28.0000 + 0.0000i, 
-4.0000 + 9.6569i,
-4.0000 + 4.0000i,
-4.0000 + 1.6569i,
-4.0000 + 0.0000i, 
-4.0000 - 1.6569i,
-4.0000 - 4.0000i,
-4.0000 - 9.6569i}
独留℉清风醉 2024-11-18 07:33:48

不,这是不正确的(单个非零输出元素意味着您的输入由常数值或单个复指数分量组成)。

为什么不使用现有的 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?

你列表最软的妹 2024-11-18 07:33:48

根据 Wolfram Alpha 它是:

在此处输入图像描述

请注意,没有单一的“正确答案”,因为有多个DFT/FFT 的一种定义,每个定义之间的区别在于您为正向变换和反向变换包含的缩放因子。 (这个答案和之前接受的答案之间的区别只是 sqrt(8) 的比例因子)。

According to Wolfram Alpha it's:

enter image description here

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)).

倾其所爱 2024-11-18 07:33:48

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},
结果是:

{12, 16i}
{-8, 0i}
{-4, -4i}
{0, -8i}

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:

{12, 16i}
{-8, 0i}
{-4, -4i}
{0, -8i}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文