Skip to content

Instantly share code, notes, and snippets.

@diogomonica
Created March 5, 2014 02:23
Show Gist options
  • Save diogomonica/9360033 to your computer and use it in GitHub Desktop.
Save diogomonica/9360033 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<head>
<title>fft.js</title>
<script src='lib/real.js'></script>
<script src='lib/complex.js'></script>
<script>
var input = new Float64Array(32);
var result = new Float64Array(64);
for (var j = 0; j < 32; j++){
input[j] = j;
}
console.log(input);
console.log(result);
fft = new FFT.complex(32, false);
fft.simple(result, input, 'real')
console.log(result);
</script>
</head>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment