[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:
i=1;
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
work?
TIA,
Mike
-------------------------------------------------------------
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
-------------------------------------------------------------
- sprintf to make filenames,
Mike Miller <=