Jump to content

Fast Fourier transform: Difference between revisions

(Updated D code)
Line 613:
 
Output: <pre>{4. + 0. I, 1. - 2.4142136 I, 0. + 0. I, 1. - 0.41421356 I, 0. + 0. I, 1. + 0.41421356 I, 0. + 0. I, 1. + 2.4142136 I}</pre>
 
=={{header|MATLAB}} / {{header|Octave}}==
 
Matlab/Octave have a builtin FFT function.
 
<lang MATLAB> fft([1,1,1,1,0,0,0,0]')
</lang>
Output:
<pre>ans =
 
4.00000 + 0.00000i
1.00000 - 2.41421i
0.00000 + 0.00000i
1.00000 - 0.41421i
0.00000 + 0.00000i
1.00000 + 0.41421i
0.00000 - 0.00000i
1.00000 + 2.41421i</pre>
 
 
=={{header|OCaml}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.