Filter löschen
Filter löschen

Error when saving a work space

10 Ansichten (letzte 30 Tage)
Marcus Rosales
Marcus Rosales am 8 Apr. 2020
Kommentiert: Marcus Rosales am 15 Apr. 2020
Hello, I am trying to save a workspace after I run a simulation but something seems to be going wrong... I have attached two screen shots of what matlab tells me.
I'm not sure if there is any real limitation on what size variables you can and can not store, but I am guessing there is another issue other than this. If you have any idea, I'd really appreciate some help! I want to compare multiple results from different simulations which will take forever if I can not just save the variables! Thanks in advanced.

Akzeptierte Antwort

Vinai Datta Thatiparthi
Vinai Datta Thatiparthi am 12 Apr. 2020
Bearbeitet: Vinai Datta Thatiparthi am 12 Apr. 2020
Hello Marcus,
As a workaround, try using the 'v7.3' flag from the command window while using "save". Large files require using this flag when working with "save".
For example, to save the variable 'D',
save('DVal.mat', 'D', '-v7.3')
You can set 'v7.3' as the default in -
Preferences --> MATLAB --> General --> MAT-Files
Secondly, loading a MAT file which is still being saved in the background or which was interrupted halfway through (because of closing MATLAB, or any other reason) results in the error "File might be corrupted".
Hope this helps!
  1 Kommentar
Marcus Rosales
Marcus Rosales am 15 Apr. 2020
Thanks for the reply! I'll just put that line of code at the end of my file with the desired variables.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Workspace Variables and MAT-Files finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by