Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Structure handling (DIR output)
Replies: 3   Last Post: Oct 15, 2008 12:12 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Dimitri Shvorob

Posts: 49
Registered: 4/1/08
Structure handling (DIR output)
Posted: Oct 7, 2008 4:01 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I would like to get a cell array of strings, listing files and subdirectories in a directory. The best I can manage is:

list = dir;
n = length(list);
x = cell(n,1);
[x{:}] = deal(list(1:n).name)

Is there a better way?

Thank you.




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.