- The use of '-append' adds to a previous .mat file which always gives a chance for something to happen. Can you create a system of rotating backup files that are each complete instead, perchance?
- Have you upgraded versions between? .mat file format is not supposed to change but there's always that outside chance something happened, although anything systematic would be found and flagged by a multitude of users very quickly.
Why does my .mat file keep getting corrupted?? 😖
3 次查看(过去 30 天)
显示 更早的评论
At the beginning of my script I load my workspace variables..
load SA_Measurements
At the end of my script I save.
save("SA_Measurements.mat",'Main_Settings','Main_TF','Sub_Settings','Sub_TF','Results','-append');
I can run the script on the same day without problems. If I come back a month later, I get an error about the file being corrupt and it won't load at all or, like today, it will load some of the variables and show this error: Error using load
Cannot read file /Documents/MATLAB/SubAligner/SA_Measurements.mat.
I've been through many forum posts, but can't find a solution. What am I doing wrong??
5 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!