Mat file corrupt? I'm not so sure...
조회 수: 3 (최근 30일)
이전 댓글 표시
Hi,
I have a random issue where the following line in my code:
data = load(job_output_filenames{job_index});
ends up generating a message that it's unable to load that mat file, and it may be corrupt. Maybe 50% of the time. Yet every time I drag it into Matlab, it opens fine, and I see 4 variable cell arrays, all looking OK. Could it possibly be memory, or heap space? I have 600mb heap now...if I go too much higher, Matlab says it cannot open, so it reduces back to 128mb.
If it happens again, I can capture exact error messages if it helps....
Dave
댓글 수: 7
Geoff Hayes
2015년 3월 28일
David - I don't see any issue with the AoA, and combining variables with different dimensions shouldn't be a problem (most everyone does this).
답변 (1개)
Jan
2015년 3월 28일
The file is valid. If you obeserve random problems, there must be a random source for this, e.g. a corrupted hard disk or a failing network connection. So check this at first.
Another problem, which looks random, although it is not, is omitting the path of the file. Then Matlab searchs the file in the current folder, but e.g. a timer or GUI callback can change the current folder unexpectedly. If the unexpected current folder contains a damaged file with teh same name, it is hard to detect this. Therefore it is strongly recommended to include the full path of a file in evey case.
댓글 수: 3
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!