Reputation: 23
I have Fortran code, which calculates the capacity (of a slab) by an incremental applied deflection. In every loop, I apply higher deflection, and I calculate the corresponding capacity. I need to export the results of each loop in order to plot it. I tried to export to a txt file (WRITE command), but every loop replaces the next. So I have the results only of the last loop.
The code is a bit complicated and big. But if it helps, I can upload it.
Upvotes: 1
Views: 142
Reputation: 3264
The easiest thing to do would be to create a character variable that changes with each loop (so that it would be loop001
for the first iteration, loop002
for the second, and so on down the line).
You could alternatively use access=append
in the open statement. With this alternative, I would recommend adding an extra space and a line that tells you what that section of data represents (like, "deflection versus angle 0.17 radians").
Upvotes: 1