javascript - 快速傅里叶变换Javascript

标签 javascript python fft

我需要一个 FFT 函数,例如 numpy 中的 FFT (python) 只需要一个列表(长度不一定需要是 2 的幂)。

我用了dsp.js但它需要缓冲区大小,并且缓冲区大小必须是2的幂,但我的数据长度是500。

有没有非音频专用的库? 或者我应该添加 0到数组末尾?

最佳答案

您绝对可以用零填充以达到所需的大小。请参阅此引用:http://www.bitweenie.com/listings/fft-zero-padding/

直接引自文章:

There are a few reasons why you might want to zero pad time-domain data. The most common reason is to make a waveform have a power-of-two number of samples. When the time-domain length of a waveform is a power of two, radix-2 FFT algorithms, which are extremely efficient, can be used to speed up processing time. FFT algorithms made for FPGAs also typically only work on lengths of power two.

关于javascript - 快速傅里叶变换Javascript,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38316538/

相关文章:

javascript - 如何在 jQuery 或 JS 中使用 Laravel URL::asset

python - Polars API 注册和类型检查器

python - 生成缩进的多重索引

algorithm - 快速傅里叶变换多项式乘法?

javascript - "Phased"在javascript中执行函数

javascript - 具有列定义查找的 AngularJS 动态表

python - 不明白Python中将循环转换为列表的代码

python - FFT算法错误

algorithm - boolean 卷积算法?

javascript - 在表格中使用 javascript 绘制到 Canvas