How can I save workspace variables from starting to the close of matlab i.e., as long as matlab is running, all variables will be saved.
1 view (last 30 days)
Show older comments
Hi, I want to save all workspace variables to a mat file as long as matlab is running. I know the save function can save all workspace variables currently available. After saving the mat file, further usage of variables are not stored in that mat file unless I use the save instruction again. But I want to save all workspace variables to a mat file as long as matlab is running. Please help me. Thanks in advance. Delwar
0 Comments
Answers (1)
dpb
on 20 Jul 2013
Not implemented.
Autosave works in the code editor if preferences are set but no equivalent for the workspace. There is a shortcut for save (ctrl-S) but no scheduled execution in background.
Enhancement request time???? Anybody else thought/think they would want this feature?
I've not tried it to see how intrusive it might be but in theory you could use a timer object and have its callback execute the
save -append
function. I'd think it might turn out to be rather annoying, especially if the sizes of workplace variables get large.
0 Comments
See Also
Categories
Find more on Workspace Variables and MAT Files in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!