Info
この質問は閉じられています。 編集または回答するには再度開いてください。
listing files in textfile
1 回表示 (過去 30 日間)
古いコメントを表示
k
1 件のコメント
Walter Roberson
2012 年 8 月 13 日
The fprintf() could be simplified to
fprintf(fff, '%s\n', fileNames{i});
回答 (1 件)
Walter Roberson
2012 年 8 月 13 日
The order of files returned by dir() is "whatever is returned by the underlying operating system". In turn operating systems might use different orderings depending on the variety of filesystem being used.
You must therefore sort the names before you print them out. See http://www.mathworks.com/matlabcentral/fileexchange/8399-sortn-sort-textual-lists
0 件のコメント
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!