help-octave
[Top][All Lists]
Advanced

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

Re: loading 100-200 .dat


From: Stefan van der Walt
Subject: Re: loading 100-200 .dat
Date: Mon, 12 Jul 2004 10:32:19 +0200
User-agent: Mutt/1.5.6+20040523i

Or do it directly in Octave:

---
files = glob('*.dat');

for i = 1:length(file)
  load(files{i})
endfor
---

If David's patch gets applied, it would simply become

for f = glob('*.dat')
  load(f)
endfor

Regards
Stefan

On Sun, Jul 11, 2004 at 04:35:19PM -0600, Dmitri A. Sergatskov wrote:
> mimo wrote:
> > Hi there, 
> > 
> > Is there a convenient way to load all .dat in one directory.  Just don't 
> > know 
> > how to tell octave to get all .dat fiiles one by one. I've been searching 
> > quite a while... pretty sure it's merely one line for experienced :-)
> > 
> > thomas
> > 
> 
> I would write an .m file that loads all those files. You can write a simple
> shell script to create the .m file, e.g.:
> 
> (in your terminal shell)$ for i in *.txt ; do echo load ${i} ; done > 
> loadall.m
> 
> Then execute 'loadall' in octave...
> 
> Regards,
> 
> Dmitri.



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