help-octave
[Top][All Lists]
Advanced

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

Loading multiple files


From: sar7501-octave
Subject: Loading multiple files
Date: Fri, 11 Mar 2005 15:40:31 +1100 (EST)

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

to do this but it's obviously pretty slow due to the use of the eval command.
Is there a better way to do this?

Thanks for your help,

Scott

Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com



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