[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [femm] question about makeplot()



I may be missing something here but wouldn't it be easier just to write the second lot of data to a different file?

Keith.

At 23:45 17/03/2003 -0800, you wrote:
Hi
You can use the way, you use a temp file for
makeplot() and after that you can copy content of the
file to another file, which will colected all the
data.

The makeplot() put data to temp.txt. After each
calling makeplot() put few lines for copy to the file
result.txt


handle1 = openfile("results.txt","a") handle2 = openfile("temp.txt","r") -- reads the whole file x = read(handle2,"*a") write(handle1,x) closefile(handle1) closefile(handle2)


Or you can make also you own function and to call instead of the makeplot() the makeplotadd()

function makeplotadd(a, b, c, d)
makeplot(a,b,"temp.txt",d);
handle1 = openfile(c,"a")
handle2 = openfile("temp.txt","r")
x = read(handle2,"*a")
write(handle1,x)
closefile(handle1)
closefile(handle2)

end

Bye

Jiri Vecerka


--- physiker11 <webmaster@xxxxxxxxxxxxxx> wrote: > it seems that this command doesn't need openfile() > to be able to > write to a file, but at the same time it doesn't > seem like i can set > the write type (ie. overwrite, append) > > Every time i call this function it overwrites the > previous > information. Is there a simple way around this? > > ie. the first data set is overwritten by the 2nd. > > clearcontour() > addcontour(0,27.5) > addcontour(0,-27.5) > makeplot(4,1000,"helmholtz_results.txt",0) > clearcontour() > addcontour(0,0) > addcontour(40,0) > makeplot(4,1000,"helmholtz_results.txt",0) > > > Cheers > > >


__________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com




Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/