[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Parse a directory
From: |
Miquel Cabanas |
Subject: |
Re: Parse a directory |
Date: |
Tue, 07 Feb 2006 14:37:47 +0100 |
hi,
in version 2.1.69 (running on Sarge Debian GNU/Linux) it works as in
Matlab. What is the output of "help dir" in your version? how does it
compares to what I get in mine?
-- Function File: dir (DIRECTORY)
-- Function File: [LIST] = dir (DIRECTORY)
Display file listing for directory DIRECTORY. If a return value
is requested, return a structure array with the fields
name
bytes
date
isdir
statinfo
as you can see, in 2.1.69, can handle return values. If version 2.1.50
cannot then it's time for upgrading.
Miquel
On Tue, 2006-02-07 at 13:27 +0100, Achim Graupner wrote:
> Hi all,
>
> I want to read a bunch of files in a directory. I Matlab I would do this like
> > myfiles = dir('./*.dat')
> myfiles =
> 4x1 struct array with fields:
> name
> date
> bytes
> isdir
> as seen, myfiles is an array of struct containing all filenames, sizes etc.
>
> in octave (2.1.50) I get the error message
> > myfiles = dir('./*.dat')
> error: value on right hand side of assignment is undefined
> error: evaluating assignment expression near line 11, column 2
>
-------------------------------------------------------------
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
-------------------------------------------------------------