I'm able to save a large .mat as '-v7.3' but then can't load or import it into R2017a because "File might be corrupt"

8 views (last 30 days)
Hello! I am trying to save a large workspace as a .mat for later use. While saving as version 7.3 works, I cannot load or import the new .mat file into R2017a.
Here is the error I get with save:
Save operation failed. This variable cannot be saved to a MAT-file whose version is older than 7.3, because it is too large.
Here is the error I get with import:
Unknown text on line number 1 of ASCII file C:\Users\engineer\Documents\MATLAB\SPC Post Process\data.mat "".
Here is the error I get with load:
Unable to read MAT-file C:\Users\...\data.mat. File might be corrupt.
It may be important to note that I am trying to save a workspace in the middle of a script, which I am stopping short after the save completes. While I don't think this would affect the result, I could be wrong and would rather y'all know.
Any advice would be greatly appreciated.
Thanks, Kat
  4 Comments
Manan Mishra
Manan Mishra on 10 Jan 2018
It's difficult to say what could be going wrong here. It could be due to the kind of data you are saving in MAT file. It could also be due to the workflow of saving the workspace in the middle of script which might be leading to an incomplete save.
Can you share the MAT file which is giving the error?
Also on your end, you can try to save a workspace having similar size and data, without the script running (maybe at the end of the script) and see if that gives the error or not.
kickstandkat
kickstandkat on 11 Jan 2018
Hello!
Unfortunately, I cannot share the .mat file. I will try saving it outside of the script and get back to you.
Thanks again, Kat

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!