summaryrefslogtreecommitdiffstats
path: root/fft.txi
blob: 80c19e966b2bd7fb7266763fae5d1fd0f53d4af0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
@code{(require 'fft)}
@ftindex fft


@defun fft array

@var{array} is an array of @code{(expt 2 n)} numbers.  @code{fft}
returns an array of complex numbers comprising the
@dfn{Discrete Fourier Transform} of @var{array}.
@cindex Discrete Fourier Transform
@end defun


@defun fft-1 array

@code{fft-1} returns an array of complex numbers comprising the
inverse Discrete Fourier Transform of @var{array}.
@end defun

@noindent
@code{(fft-1 (fft @var{array}))} will return an array of values close to
@var{array}.

@example
(fft '#(1 0+i -1 0-i 1 0+i -1 0-i)) @result{}

#(0.0 0.0 0.0+628.0783185208527e-18i 0.0
  0.0 0.0 8.0-628.0783185208527e-18i 0.0)

(fft-1 '#(0 0 0 0 0 0 8 0)) @result{}

#(1.0 -61.23031769111886e-18+1.0i -1.0 61.23031769111886e-18-1.0i
  1.0 -61.23031769111886e-18+1.0i -1.0 61.23031769111886e-18-1.0i)
@end example