[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Saving variables file name
From: |
John W. Eaton |
Subject: |
Re: Saving variables file name |
Date: |
Sun, 10 Oct 2004 12:11:25 -0400 |
On 10-Oct-2004, Jonathan C. Webster <address@hidden> wrote:
| Sure you can. Construct the fname of your choice with sprintf.
| Then construct an Octave command using that name and eval() it.
|
| fileNam = sprintf("%s.txt",runNo);
| str = sprintf("save %s v",fileNam);
| eval(str);
You don't need eval. You can use the functional form of save:
save (sprintf ("file%d.txt", i), "v")
jwe
-------------------------------------------------------------
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
-------------------------------------------------------------