[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
"save" and "load" commands
From: |
John W. Eaton |
Subject: |
"save" and "load" commands |
Date: |
Wed, 8 Dec 1999 21:30:59 -0600 (CST) |
On 8-Dec-1999, Michelle L Povinelli <address@hidden> wrote:
| I would like to successively load data from, for example,
| files named "myfile1," "myfile2," "myfile3,"... etc.
| If I create a string variable holding the file name,
| and try to load it with
|
| for ii=1:200
| filename=["myfile" num2str(ii)]
| load filename
| end
|
| octave tries to load from the file "filename," not "file1," etc.
| How do I force evaluation of the string variable in the load (or save)
| commands?
Write either
load (filename);
or
eval (sprintf ("load %s", filename));
jwe
-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.che.wisc.edu/octave/octave.html
How to fund new projects: http://www.che.wisc.edu/octave/funding.html
Subscription information: http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------