快速傅立叶变换 - 多项式相乘?

发布于 2024-07-17 10:35:23 字数 80 浏览 3 评论 0原文

我只是不明白如何对两个多项式(例如 X^2+1 和 X+1)执行 FFT...任何人都可以和我一起逐步完成该过程吗?

非常感谢

i just don't understand how to perform a FFT on two polynomials such as X^2+1 and X+1...can anyone step by step go through the process with me?

Thanks very much

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

诗笺 2024-07-24 10:35:23

只需使用多项式系数作为 fft 的输入:

octave:16> poly1=[1 0 1 0]
poly1 =

   1   0   1   0

注意:这意味着 x^2+1

octave:17> poly2=[1 1 0 0]
poly2 =

   1   1   0   0

octave:18> ifft( fft(poly1).*fft(poly2))
ans =

   1   1   1   1

这就是结果。 解释为x^3+x^2+x+1,它是两个多项式的乘积。

Just use your polynomial coefficients as input for fft:

octave:16> poly1=[1 0 1 0]
poly1 =

   1   0   1   0

Note: this means x^2+1

octave:17> poly2=[1 1 0 0]
poly2 =

   1   1   0   0

octave:18> ifft( fft(poly1).*fft(poly2))
ans =

   1   1   1   1

This is the result. Interpret as x^3+x^2+x+1, which is the product of the two polynomials.

丢了幸福的猪 2024-07-24 10:35:23

但实际上这里发生的是卷积。

ifft( fft(poly1).*fft(poly2))

相当于卷积(适当填充)。 卷积可以解释为两个多项式的乘法。 去查找卷积的定义(非常简单)并在纸上手工算出来。 我希望它能为您带来很多启发......

保罗
中心空间软件

But really what is going on here is convolution.

ifft( fft(poly1).*fft(poly2))

is the equivalent of convolution (properly padded). And convolution can be interpreted as the multiplication of two polynomials. Go look up the definition of convolution (it's very simple) and work it out by hand on paper. I expect that it will shed a lot of light on this for you...

Paul
CenterSpace Software

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