#include
#include
#include
#define N1 4
#define N2 3
#define N3 2
#define M 3
int main() {
int i,j,k,retval;
array double complex x1[N1][N2];
array double complex y[M][M],x2[M][M];
int dim[2];
dim[0]=M;dim[1]=M;
urand(x1);
fft(y,x1,dim);
dim[0]=M;dim[1]=M;
ifft(x2,y,dim);
printf("Input data =\n");
printf("%5.3f",x1);
printf("\nFFT result data =\n");
printf("%5.3f",y);
printf("\nFFT + iFFT result data =\n");
printf("%5.3f",x2);
}

Input data =
complex(0.514,0.000) complex(0.176,0.000) complex(0.309,0.000)
complex(0.535,0.000) complex(0.948,0.000) complex(0.172,0.000)
complex(0.702,0.000) complex(0.226,0.000) complex(0.495,0.000)
complex(0.125,0.000) complex(0.084,0.000) complex(0.390,0.000)
FFT result data =
complex(0.514,0.000) complex(0.176,0.000) complex(0.309,0.000)
complex(0.535,0.000) complex(0.948,0.000) complex(0.172,0.000)
complex(0.702,0.000) complex(0.226,0.000) complex(0.495,0.000)
FFT + iFFT result data =
complex(0.514,0.000) complex(0.176,0.000) complex(0.309,0.000)
complex(0.535,0.000) complex(0.948,0.000) complex(0.172,0.000)
complex(0.702,0.000) complex(0.226,0.000) complex(0.495,0.000)