File: fft.cat

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (64 lines) | stat: -rw-r--r-- 1,835 bytes parent folder | download
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
FFT              Scilab Group              Scilab Function              FFT
NAME
   fft - fast Fourier transform.
  
CALLING SEQUENCE
 [x]=fft(a,-1)
 [x]=fft(a,1)
 x=fft(a,-1,dim,incr)
 x=fft(a,1,dim,incr)
PARAMETERS
 x          : real or complex vector. Real or complex matrix (2-dim fft)
            
 a          : real or complex vector.
            
 dim        : integer
            
 incr       : integer
            
DESCRIPTION
   Short syntax (one or two dimensional fft):
  
   gives a direct transform (the -1 refers to the sign of the exponent...,
  NOT to "inverse"), that is
  
   x(k)=sum over m from 1 to n  of a(m)*exp(-2i*pi*(m-1)*(k-1)/n)
  
   for k varying from 1 to n (n=size of vector a).
  
   performs the inverse transform normalized by 1/n.
  
   (fft(fft(.,-1),1) is identity).
  
   When the first argument given to fft is a matrix a two-dimensional FFT is
  performed.
  
   Long syntax (multidimensional FFT):
  
   allows to perform an multidimensional fft.
  
   If a is a real or complex vector implicitly indexed by x1,x2,..,xp i.e.
  a(x1,x2,..,xp) where x1 lies in  1..dim1, x2 in 1.. dim2,... one gets  a
  p-dimensional FFT p by calling p times fft as follows
  
  a1=fft(a ,-1,dim1,incr1)
  a2=fft(a1,-1,dim2,incr2) ...
   where dimi is the dimension of the current variable w.r.t which one is
  integrating and incri is the increment which separates two successive xi
  elements in a.
  
   In particular,if a is an nxm matrix, x=fft(a,-1) is equivalent to the two
  instructions:
  
   a1=fft(a,-1,m,1) and x=fft(a1,-1,n,m).
  
   if a is an hypermatrix (see hypermat) fft(a,flag) performs the N
  dimensional fft of a.
  
EXAMPLE
 a=[1;2;3];n=size(a,'*');
 norm(1/n*exp(2*%i*%pi*(0:n-1)'.*.(0:n-1)/n)*a -fft(a,1))
 norm(exp(-2*%i*%pi*(0:n-1)'.*.(0:n-1)/n)*a -fft(a,-1))  
SEE ALSO
   corr