[Top][All Lists]

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

sprintf to make filenames

From: Mike Miller
Subject: sprintf to make filenames
Date: Mon, 11 Mar 2002 10:33:19 -0600 (CST)

Hello all--

I want to be able to use the usual save command of this form:

save -ascii file_0001.dat matrixdata

but I'd like for the filename to be determined by a variable in this sort
of way:

save -ascii sprintf("file_%04d.dat",i) matrixdata

That doesn't work because Octave doesn't seem to interpret the sprintf
command to produce the string for the filename.  How can I get this to



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]