Hey everyone. I want to extract numerical data from files let's say g0001.txt to g0060.txt and store it in a matrix with each element is an array.
like this:
M=[g1() g2() g3() ...g60()]
matrix order can be 1 x 60 , i.e. to say 1 row and 60 columns and each element is an array...
Hey guys i am a little confused in how to write arrays to a output file in FORTRAN 77. Here is the piece of code:
Please assume that rri and eei arrays have been defined correctly above
open (16,file='output.out')
write (16,6100) rri eei
format (5e16.8)
However in the output file...
Yup, well that was the error.
Thank you all of you, this program has been fun to debug. I don't know why the compiler didn't show this error or why the hell it was pointing to courant sub routine. I had to find this one manually by reading it.
Just a thought, do you guys see a possible error in this line?
open (16,file='boplot00.out',status='old')
write (16,6100) rri,eei
6100 format (5e16.8)
Is the correct way to open a new file for storing results ?
Hey Mark44, that's a great idea. I did, as you said and added the print statement.
print*, x0, e(k-1), x0/(e(k-1)
Well none of the values were equal to 0 or negative, hence i don't think that was the error in code.
But it's a start in debugging, and I would love to hear more such...
Do any of you guys have experience with f2c program ?
I was wondering whether I could translate the given FORTRAN code to C, which will make debugging and changing code easier.
Mark44, here it is:(it is huge)
program coad1d
parameter (n=400)
implicit double precision (a-h,o-z)
common /const/ rq0,dlnr,scal,ax
common /cour/ c(n,n),ima(n,n)
common /grid/ g(n),r(n),e(n)
common /kern/ ck(n,n),ec(n,n)
dimension...
Hey everybody, I am a mechanical engineer and new to Fortran(I have decent experience in programming in C, Matlab and understand languages similar to them). However the Fortran programming structure is new to me. Hence I am facing problems debugging a Fortran code.
Here is the link of the code...
Sorry for again disturbing all of you guys, but there seems to be another problem in the program.
It runs initially, but when I enter the values initially asked, the program stops mid-way showing an error:
Run-time Error
*** Error 112, Reference to undefined variable, array element or...
Hey everybody, I am a mechanical engineer and new to Fortran(I have decent experience in programming in C, Matlab and understand languages similar to them). However the Fortran programming structure is new to me. Hence I am facing problems debugging a Fortran code.
Here is the link of the code...
Someone I know clicked the image attached while on an airplane... I am confused regarding the strange contrasting pattern of clouds seen in this picture which makes us perceive that sun is leaving a trail(not really)... What caught my attention in this picture is the orientation of the...
Look at DOF in another way... Try to find the minimum number of coordinates you need to know the exact position of CO2 molecule , there are three atoms with each having x,y coordinates. Assume that you know the distance between Carbon And oxygen atoms.