JavaScript 中的 FFT

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7821473/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-26 01:26:09  来源:igfitidea点击:

FFT in JavaScript

javascriptfft

提问by Alexey Gusev

Can anyone point me to an implementation of a Fast Fourier Transform in JavaScript? Should work with just a simple array of real values.

谁能指出我在 JavaScript 中快速傅立叶变换的实现?应该只处理一个简单的实数值数组。

Thanks.

谢谢。

回答by Fernando Rosado

You can search any Java FFT algorithm and port it to javascript easy.

您可以搜索任何 Java FFT 算法并将其轻松移植到 javascript。

A example, here :

一个例子,在这里:

This implementation require two classes + FFT java code (princeton)+ Complex dependency

这个实现需要两个类+ FFT java代码(普林斯顿)+复杂的依赖

This could be easier and direct to apply: + FFT Java Code (columbia)

这可能更容易和直接应用:+ FFT Java 代码(哥伦比亚)

This code it's easy to port to Javascript, only remember that JavaScript functions Math.sin and Math.cos work on radians and not on degrees.

这段代码很容易移植到 Javascript,只记得 JavaScript 函数 Math.sin 和 Math.cos 工作在弧度上而不是度数上。