help-octave
[Top][All Lists]
Advanced

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

Re: Loading multiple files


From: Paul Kienzle
Subject: Re: Loading multiple files
Date: Thu, 10 Mar 2005 23:53:03 -0500


On Mar 10, 2005, at 11:40 PM, <address@hidden> wrote:

Hi,

I'd like to be able to read a large number of files into Octave at once where the filenames only differ slightly - file_001.txt, file_002.txt, etc. I've been
using the following code:

--------
for i=1:10
  filename=strcat("file_",sprintf("%03d",i),".txt")
  eval(["load ",filename]);
endfor
--------



Use load(filename) instead.


- Paul



-------------------------------------------------------------
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
-------------------------------------------------------------



reply via email to

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