Creating a cell structure from directory file names

22 次查看(过去 30 天)
Good afternoon,
I am currently trying to create a cell array of file names using the dir function. For example:
datedir = dir('directorygoeshere');
I want to make my function "datedir" to be a 1xn cell and am having a bit of difficulty choosing the right conversion function. Any help would be greatly appreciated. Thanks!

回答(1 个)

Thorsten
Thorsten 2016-9-6
datedir = dir('directorygoeshere');
filenames = {datedir.name}:

类别

Help CenterFile Exchange 中查找有关 File Operations 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by