Anonymous user
Fast Fourier transform: Difference between revisions
→{{header|MATLAB}} / {{header|Octave}}: FFT in Matlab/Octave
(Updated D code) |
(→{{header|MATLAB}} / {{header|Octave}}: FFT in Matlab/Octave) |
||
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}}==
|