Reading many files in one loop
古いコメントを表示
How can I read file names and convert them to a matrix? I have more than one file and I want to read their contents in one loop of the program. Thanks
採用された回答
その他の回答 (2 件)
ChristianW
2013 年 4 月 4 日
doc dir
D = dir([myfolder 'my*file*name*.*']);
files = {D.name}';
2 件のコメント
John
2013 年 4 月 12 日
This means, that no file matchs the filter:
'C:\Documents and Settings\John\My Documents\MATLAB\Pic_Down*.jpg'
Perhaps you want:
'C:\Documents and Settings\John\My Documents\MATLAB\Pic_Down\*.jpg'
Note: fullfile() is much better for constructing file names than STRCAT, HORZCAT or [.].
Jan
2013 年 4 月 4 日
0 投票
It is always a good idea to read the FAQ, because it is efficient to profit from the errors of others.
カテゴリ
ヘルプ センター および File Exchange で String Parsing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!