help-octave
[Top][All Lists]
Advanced

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

Using strings as arguements?


From: Ross Vandegrift
Subject: Using strings as arguements?
Date: Sun, 7 Dec 2003 18:02:01 -0500
User-agent: Mutt/1.3.28i

I'm working on a project that needs to generate a bunch of data plotse
The script iterates through different degrees, fitting different
polynomials to a common set of points.

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?

Thanks!


-- 
Ross Vandegrift
address@hidden

A Pope has a Water Cannon.                               It is a Water Cannon.
He fires Holy-Water from it.                        It is a Holy-Water Cannon.
He Blesses it.                                 It is a Holy Holy-Water Cannon.
He Blesses the Hell out of it.          It is a Wholly Holy Holy-Water Cannon.
He has it pierced.                It is a Holey Wholly Holy Holy-Water Cannon.
He makes it official.       It is a Canon Holey Wholly Holy Holy-Water Cannon.
Batman and Robin arrive.                                       He shoots them.



-------------------------------------------------------------
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
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]