MATLAB Answers


saving and loading global variables

Asked by craq
on 5 Dec 2013
I know that global variables are evil. But I'm taking over a project from someone else, and while I try to re-work it to avoid global variables, it would be helpful in the meantime if I could save or load the global workspace to a mat file. Does anyone here know a way?
This idea imports all global variables to the current workspace, and I guess I could save them from there, but I would have to remember that they were global when I re-imported the mat file
This thread implies that a simple save used to work, way back in 1997


Sign in to comment.

0 Answers