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!