pluton
unread,May 6, 2013, 9:11:51 PM5/6/13You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hello,
in the loop below, the A[k] are plots involving simple curves previously calculated. I would like to export the numerical values associated to each of these plots in external text files. Here is what is done:
for k from 1 to 10 do:
B:=op(1,op(1,A[k])):
for i from 1 to nops(B) do:
myline:=sprintf("%10.6f\t%10.6f",B[i,1],B[i,2]):
writeline("data[k].dat",myline):
end do:
close("data[k].dat"):
end:
The problem is that I want to iterate on the names of the output files, ie data[k].dat. In the above example, I want to write in the files data1.dat, data2.dat, ... data10.dat while the provided code only writes in data[k].dat. How can this be achieved?
Thank you