Thank you so much again, Mikrom. Just having someone give input really helps a lot.
So I changed the declaration of pi and a(4) to kind=2 and now the program does, in fact, run. The values of the coefficients the program outputs seem to be correct(I checked with a well-known function) but they...
Ok so I tried creating a main program with an array a(i). I then tried calling a different subroutine which computes a Real Discrete Fourier Transform since I gave a(i) real values. Here is the main program:
program maincall
real a(4)
real, parameter :: pi = 3.14159265
integer n
n = 4
a(1) =...
So if I wrote a main program:
program main
call cdft(2*n, cos(pi/n), sin(pi/n), a)
How would I go about inputting data and then outputting the result of the fourier transform? Would I create an array a(n)?
Any help would be much appreciated!!
I am a complete beginner at programming and using Fortran. I am actually a Physics major and I am trying to learn more about Fourier Transforms. I have been looking at Ooura's 1-D DFT program and it compiles but does not give an output of the Fourier Transform. How would I do this?
(Also, Dr...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.