From help-octave-request at bevo dot che dot wisc dot edu Wed Apr 10 08:25:39 2002 Subject: Re: Unidentified subject! From: Andreas Helms To: Eoin Phillips Cc: help-octave at bevo dot che dot wisc dot edu Date: Wed, 10 Apr 2002 15:25:32 +0200 You can do it the following way: focal_length = 100.0; stmt = sprintf ("gset title \'Cavity coupling (focal length = %f)\' ",... focal_length) eval(stmt) On Wednesday 10 April 2002 15:14, Eoin Phillips wrote: > I was wondering if it's possible to include variables in gset commands? > Ideally I'd like to have something like: > gset title "Cavity coupling (focal length = %f)" > > where f is an Octave variable. A similar command gives the following > error: > octave:26> gset title wbeam; > octave:27> line 0: undefined variable: wbeam > > octave:28> wbeam > wbeam = 0.0020000 > > So wbeam is definitely defined as a real scalar, but telling gnuplot to > use it seems to be the problem. Any ideas? > > Eoin > > __________________________________________________ > Do You Yahoo!? > Everything you'll ever need on one web page > from News and Sport to Email and Music Charts > http://uk.my.yahoo.com > > > > ------------------------------------------------------------- > 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 > ------------------------------------------------------------- -- Lehrstuhl Astrophysik mailto:helms at astro dot physik dot uni-potsdam dot de Universitaet Potsdam http://www.astro.physik.uni-potsdam.de/~helms D-14469 Potsdam ftp://ftp.astro.physik.uni-potsdam.de/pub/helms Phone: +49 331 977 1556 FAX : +49 331 977 1107 ------------------------------------------------------------- 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 -------------------------------------------------------------