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 visualizzazione (ultimi 30 giorni)
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

Risposte (1)

dpb
dpb il 20 Lug 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.

Categorie

Scopri di più su Workspace Variables and MAT Files in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by