[Top][All Lists]

[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")


Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]