|
From: | Paul Kienzle |
Subject: | Re: Using strings as arguements? |
Date: | Sun, 7 Dec 2003 18:09:43 -0500 |
On Dec 7, 2003, at 6:02 PM, Ross Vandegrift wrote:
I'd like to be able to do something like this: gset terminal postscript for d=2:50 c = polyfit(xs,ys,d); yvals = polyval(c,xvals); figure (d) hold off title (sprintf('d = %d', d)); filename = sprintf ("%d.ps"); gset output filename plot(xvals,yvals,xs,ys,'*') end Unfortuantely, gset complains that it's expecting a filename, by which it appears to mean a properly quoted string. Is there a way I can get octave to do this?
eval (sprintf("gset output '$d.ps'",d)); ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------
[Prev in Thread] | Current Thread | [Next in Thread] |