/* Fttest.c Test case for two-dimensional Fourier transform. From Claerbout (1985) p. 69. Usage: fttest >outfile Compile: cc fttest.c ft2d.c fft.c -fswitch -lm -o fttest */ /* Get the usual standard output and math definitions */ #include #include /* Declare the structure to hold complex numbers */ struct complex { float re; float im; }; /* Enter main part of program */ main() { /* Declare all variables */ int it, nt, ix, nx; float p[64][64]; struct complex cp[64][64], cwork[64]; /* Use rows of time */ /* Assign sizes */ nx = 64; nt = 64; /* Nested loops to set complex array to zero; time varies fastest */ for(ix=0; ix