help-octave
[Top][All Lists]
Advanced

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

Re: "gset output 'filename'" question


From: Ben Sapp
Subject: Re: "gset output 'filename'" question
Date: Tue, 5 Mar 2002 09:48:58 +0700

Something similar to this will work: 

octave:1> sombrero(50)
octave:2> filename = "foo.ps"
filename = foo.ps
octave:3> gset terminal postscript enhanced color
octave:4> eval(sprintf("gset output \"%s\"",filename))
octave:5> replot

Now, you can view foo.ps with a postscript viewer.   

On Tuesday 05 March 2002 10:19 pm, Davide Cavallari wrote:
> Is it  somehow possible  to pass  a string variable  to the  "gset output"
> command? I wrote  an octave script to plot  a graph in a file  and I would
> like to pass that  file's name as an command line  argument of the script.
> But if I try e.g.
>
> filename = "foo.ps"
>
> the command
>
> gset output filename
>
> complains because it wants a literal, as in
>
> gset output 'foo.ps'
>
> What can I do?

-- 
Ben Sapp                         Los Alamos National Laboratory
email: <mailto:address@hidden>   Phone: (505)667-3277
Fax:   (505)665-7920             URL:   http://www.neutrino.lanl.gov/
--



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