aboutsummaryrefslogtreecommitdiffstats
path: root/fft.txi
blob: c73f10358ce42dc84a464d8f1cc5fabc46d4d58d (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
@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