Computational Science Asked by Dark Knight45 on June 24, 2021
I am new to Fortran and I am trying to write a code using random data instead of binned data in x, y, z as shown in my sample code.
implicit real*8(a-h,o-z)
dimension rm(4),rp1(4),rip1(4),rp2(4),rip2(4),rp3(4),rip3(4),
d rn(4),u1(4),u2(4),u3(4)
do ix= 1000,25000,1000
x = ix/1000000.
do iy = 1000,25000,1000
y = iy/100000.
do iz= 1,1000,25
z = iz/10000.
a = (x**2+y**2)/z
b = x*y*z
c = x*y**2+y*z**2+z*x**2
fr = (a*b)/c
if(fr.ge.0.05.and.fr.le.23)then
write(40,*) x, y, x, fr
else
endif
end do
end do
end do
stop
How to convert such code having binned data to a code using random draws.
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP