diff options
| author | Charles.Forsyth <devnull@localhost> | 2006-12-22 20:52:35 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2006-12-22 20:52:35 +0000 |
| commit | 46439007cf417cbd9ac8049bb4122c890097a0fa (patch) | |
| tree | 6fdb25e5f3a2b6d5657eb23b35774b631d4d97e4 /module/ffts.m | |
| parent | 37da2899f40661e3e9631e497da8dc59b971cbd0 (diff) | |
20060303-partial
Diffstat (limited to 'module/ffts.m')
| -rw-r--r-- | module/ffts.m | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/module/ffts.m b/module/ffts.m new file mode 100644 index 00000000..67b55607 --- /dev/null +++ b/module/ffts.m @@ -0,0 +1,32 @@ +FFTs: module{ + PATH: con "/dis/math/ffts.dis"; + + ffts: fn(a,b:array of real, ntot,n,nspan,isn:int); +}; + +# multivariate complex fourier transform, computed in place +# using mixed-radix fast fourier transform algorithm. +# arrays a and b originally hold the real and imaginary +# components of the data, and return the real and +# imaginary components of the resulting fourier coefficients. +# multivariate data is indexed according to the fortran +# array element successor function, without limit +# on the number of implied multiple subscripts. +# the subroutine is called once for each variate. +# the calls for a multivariate transform may be in any order. +# ntot is the total number of complex data values. +# n is the dimension of the current variable. +# nspan/n is the spacing of consecutive data values +# while indexing the current variable. +# the sign of isn determines the sign of the complex +# exponential, and the magnitude of isn is normally one. +# univariate transform: +# ffts(a,b,n,n,n,1) +# trivariate transform with a(n1,n2,n3), b(n1,n2,n3): +# ffts(a,b,n1*n2*n3,n1,n1,1) +# ffts(a,b,n1*n2*n3,n2,n1*n2,1) +# ffts(a,b,n1*n2*n3,n3,n1*n2*n3,1) +# the data can alternatively be stored in a single vector c +# alternating real and imaginary parts. the magnitude of isn changed +# to two to give correct indexing increment, and a[0:] and a[1:] used +# for a and b |
