Hi all,
In R programming, there is the "fft" function: https://stat.ethz.ch/R-manual/R-devel/library/stats/html/fft.html
> x <- c(102, 55, 89, 12, 3, 45, 9)> fft(x) [1] 315.00000+ 0.00000i 98.57101-82.76603i -23.61882-18.71932i [4] 124.54781+ 5.66758i 124.54781- 5.66758i -23.61882+18.71932i [7] 98.57101+82.76603i > Re(fft(x)) [1] 315.00000 98.57101 -23.61882 124.54781 124.54781 -23.61882 98.57101
What I have to is to replicate the Re(fft(x)) output in Fortran. I wonder if Intel MKL could do the job.
! testfft.f90 program myfft implicit none integer, dimension(7) :: x double precision, dimension(7) :: Refftx x = (/ 102, 55, 89, 12, 3, 45, 9 /) ! ============================================================ ! ! Here, I need to use a fft function to return the result in R ! ! ============================================================ ! ! For example, Refftx = theFFTfunctionIdonotKnow(x) print*, Refftx end program myfft
How do I have to build/compile the "testfft.f90" file?
The machine I use is equipped with Intel Parallel Studio XE 2013. I generally compile .f90 files by typing ifort myfile.f90 on the Intel 64 Visual Studio 2008 mode command prompt. The machine runs Window 7 64 bit.
Thank you very much!