Previously accessible file is now inaccessible
8 ビュー (過去 30 日間)
古いコメントを表示
Hi all,
I'm trying to create a code that goes through a few thousand .txt files and extract information from each one to compile to an excel sheet. The first run using the code is always successful and outputs the file I want to see, however any subsequent runs would cause it to throw the error listed above. I've found the only way to get around this is to close out the entire matlab application and restart it again, which isn't very practical. Does anyone have a solution for this?
Thanks in advance!
0 件のコメント
採用された回答
per isakson
2019 年 9 月 18 日
編集済み: per isakson
2019 年 9 月 19 日
You need to close the file after reading, add
fclose( fileID )
after
filedata = textscan(fileID, '%s %s %s %s %s %s %s %s');
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で MATLAB Compiler についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!