help-octave
[Top][All Lists]
Advanced

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

Re: ls in an array


From: Thomas Treichl
Subject: Re: ls in an array
Date: Fri, 26 Jan 2007 23:46:18 +0100
User-agent: Thunderbird 1.5.0.9 (Macintosh/20061207)

hi,

ls list all files in a directory. how can i get the result in a array like
files = ls dir

thanks

mario

Hi Mario,

  help ls

also gives you references to other commands, so you see that there exists a readdir command in octave. Try to use

  files = readdir (".")

for the actual directory, or type instead of . the name of the directory you want to ls. files is an cell array of strings.

Thomas


reply via email to

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