help-octave
[Top][All Lists]
Advanced

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

Re: load file


From: Geraint Paul Bevan
Subject: Re: load file
Date: Wed, 24 Mar 2004 21:15:25 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031221 Thunderbird/0.4

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Guanglei Cui wrote:
| Hi,
|
| When I use load to open a file, is there a way to use the content of a
| variable as the filename? For example,
|
| a="file.dat";
| load a; ## will load a file called file.dat
|
| Thanks in advance.
|
| Guanglei
|

octave:1> file="file.dat";
octave:2> eval (sprintf ("load %s", file));


- --
Geraint Bevan
http://homepage.ntlworld.com/geraint.bevan

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iEYEARECAAYFAkBh+m0ACgkQcXV3N50QmNNi9wCbBnlSqjwWl5lGlHmrz3LXHz4P
E2YAn2en5+GrSKVHV52Z/RKZg+kcp0PX
=dKOl
-----END PGP SIGNATURE-----



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