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

# Re: [femm] question about makeplot()

- To: femm@yahoogroups.com
- Subject: Re: [femm] question about makeplot()
- From: Jiri Vecerka <vecerkaj@yahoo.com>
- Date: Mon, 17 Mar 2003 23:45:13 -0800 (PST)
- In-reply-to: <b55ilf+8gu9@eGroups.com>

    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@dccstudios.com> 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

- Follow-Ups:
  - Re: [femm] question about makeplot()
    - From: Keith Gregory <k.gregory@lboro.ac.uk>

- References:
  - question about makeplot()
    - From: "physiker11" <webmaster@dccstudios.com>

- Prev by Date: question about makeplot()
- Next by Date: Re: calulation of the magnetic flux
- Previous by thread: question about makeplot()
- Next by thread: Re: [femm] question about makeplot()
- Index(es):
  - Date
  - Thread