I am facing this problem, ":bang was not loaded from the file" when i incerase lenght of variable in for loop, how can fix this
5 ビュー (過去 30 日間)
古いコメントを表示
Caught "std::exception" Exception message is: Message Catalog MATLAB:bang was not loaded from the file. Please check file location, format or contents
0 件のコメント
採用された回答
Walter Roberson
2015 年 9 月 29 日
Please show your code.
The similar questions that I find suggest that this error is very commonly the result of having fopen()'d too many files without having closed them. In some cases involving load() in a loop, the error has be in the MATLAB implementation in some versions.
3 件のコメント
Jan
2015 年 9 月 29 日
Again: Please post the relevant part of the code, Pradeep Kumar. Without seeing any details guessing is rather hard.
Walter Roberson
2015 年 9 月 29 日
Which MATLAB version are you using?
You might be able to add
close('all')
after you do the load(), but it is not certain that the file list known to close() would include all files opened internally by load()
その他の回答 (1 件)
Pradeep Kumar
2015 年 9 月 30 日
編集済み: Walter Roberson
2015 年 9 月 30 日
3 件のコメント
Walter Roberson
2015 年 9 月 30 日
編集済み: Walter Roberson
2015 年 9 月 30 日
A readable form of the source appears to be at http://www.codeforge.com/read/234771/ReadSu.m__html . If that is the version you are using, then it appears to that the code does not fclose(segyid) after it is done with it, so you would end up with this problem.
You should only need a single close('all') after the ReadSu
I notice, however, that in the code you present, you are always reading the same file. Are you also writing to the file in the loop? If the file is not being changed in the loop, then why not just read the data once and process whatever part of it is needed in each loop?
参考
カテゴリ
Help Center および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!