Error when saving a work space

14 visualizaciones (últimos 30 días)
Marcus Rosales
Marcus Rosales el 8 de Abr. de 2020
Comentada: Marcus Rosales el 15 de Abr. de 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.

Respuesta aceptada

Vinai Datta Thatiparthi
Vinai Datta Thatiparthi el 12 de Abr. de 2020
Editada: Vinai Datta Thatiparthi el 12 de Abr. de 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 comentario
Marcus Rosales
Marcus Rosales el 15 de Abr. de 2020
Thanks for the reply! I'll just put that line of code at the end of my file with the desired variables.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Workspace Variables and MAT-Files en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by