Hello all,
I would like to plot the output from the following program but not sure on the best methodology. Looking to plot(real_part, imaginary_part) to get the orbit plot:
program Riemann_Zeta
integer, parameter :: k = 10001
integer, allocatable :: t(:)
real, allocatable :: vec(:)
integer i, j, n
real real_part(k), imaginary_part(k), start, finish, a, inc
complex s(k)
call clock@(start)
open(25,file='complex_zeta.csv',status='replace')
t=(/0, (i,i=1,k)/)
a = 0. ! initial value
inc = 0.01 ! increment value
n = 10001 ! number of values
allocate(vec(n))
vec = [(a + (i-1) * inc, i=1,n)] ! array constructor
do j = 1, k
s(j) = cmplx(0.5,vec(j)) ! Generate array of complex numbers (0-100)
end do
real_part = real(zeta_3(s,1000))
imaginary_part = aimag(zeta_3(s,1000))
!do i = 1, k
write(25,'(f15.12,',',f15.12)') (real_part(i), imaginary_part(i), i=1,k) ! write data to csv file
!end do
close(25)
call clock@(finish)
print *, zeta_3(cmplx(0.5,1.0),10000) ! complex number fixed value
print *, 'Processing time was ', finish-start, ' seconds'
contains
elemental function zeta_3(s,n) result(zs1)
integer,allocatable :: nn(:)
integer, intent(in) :: n
complex zs1
complex, intent(in) :: s
allocate (nn(n))
nn = (/(i,i=1,n)/)
zs1 = sum((-1)**(nn + 1)/(nn**s ))
zs1 = 1/(1 - 2**( 1-s ))*zs1
end function zeta_3
end program
Any advice on the best way to plot would be most helpful.
Thanks Lester