Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail From: Joe Riel Newsgroups: comp.soft-sys.math.maple Subject: Re: writeline and writedata Date: Sat, 08 Jun 2013 18:04:48 -0700 Organization: A noiseless patient Spider Lines: 22 Message-ID: <87ip1odrgv.fsf@san.rr.com> References: <6127710e-c783-43e3-91d5-9c6f52267de9@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx05.eternal-september.org; posting-host="c9831d1a913625ef026480a18b5a6e3a"; logging-data="22320"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19blqj8yAig0YW8E/f6fVrx" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:Y9ViblmryVZJE/2DcCP+sD/y+5c= sha1:CRu4acLHw0Ybx0v/tS/uG7mQEPM= Xref: csiph.com comp.soft-sys.math.maple:772 Roman Pearce writes: > On Saturday, June 8, 2013 8:02:25 AM UTC+10, pluton wrote: >> B:=plot(x,x=-1..1): # creation of the plot >> A:=op(1,op(1,B)): # counts the number of points in the plot >> Is there a simple to achieve this? > > I would convert A to a list of rows and use the seq command: > > A := convert(A,listlist): > seq( fprintf("Cfile.dat", "%10.6f\t%10.6f\n", op(i)) , i=A): > close("Cfile.dat"): That will give the most control, but here you could do fprintf("file.dat", "%{c\t}10.6f\n", A); See ?rtable_printf for the {} modifier; {c\t} means use a tab as a column separator. -- Joe Riel