Save function is taking too long and Execution cannot be stopped
42 views (last 30 days)
I'm trying to save some very large variables and testing out various ways of saving them that might best work for my workflow.
However often the save function ends up doing nothing and the command is not completed and cannot be broken with CTRL+C forcing me to force quit matlab with the task manager, which then means many hours of reloading the data back into the workspace (which is why I want to save these variables in the first place)
When you force quit matlab a window pops up and asks if I want to "stop now and exit". Is there any way to utilise this stop now aspect without actually exiting and losing the workspace?
Amit Dhakite on 5 Jun 2023
As per my understanding, you want to save very large variables in a file, but the operation is not completed and takes too long.
For your query regarding force quitting MATLAB, unfortunately there is no way to preserve the variables after the MATLAB closes, unless the process of saving them completes.
However, to improve the speed of saving large variables in a file, you may want to consider utilizing a 3rd party function called “savefast()”.
Please keep in mind that while this function has been developed and shared by a MATLAB user on the MathWorks File Exchange, it is not a built-in part of MATLAB and is not directly supported by MathWorks. You can learn more about "savefast()" and its applications through the link provided here: https://www.mathworks.com/matlabcentral/fileexchange/39721-save-mat-files-more-quickly