How to save entire workspace?

88 views (last 30 days)
Pavel
Pavel on 4 Dec 2014
Answered: Adam on 4 Dec 2014
Hello everyone! Question. Is it possible to save the workspace completely, that is, including the workspaces of all functions, persistent variables, etc.? In order to be able to start at a desired moment, when it is desired for some event.

Accepted Answer

Adam
Adam on 4 Dec 2014
Workspaces of functions?
In the vast majority of cases only 1 function is ever running (and thus has a workspace) at any given moment and the only way saving its workspace would make sense is if you interrupt that function midway through, in which case you could just save its workspace with
save( filename )
as you would for the main workspace to save all variables in it.
save( filename, '-append' )
will append to an existing workspace if you save the base workspace then want to add to it with a breakpoint in a function workspace.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!