MATLAB: Error at open 163 again (trying to open a figure)

162163errorerror 162error 163

Hey there!
I get a weird error. Before, I plotted a graph and saved the figure and afterwards, I could open it without any problems.
modeprob = figure;
save('mode_probabilities.fig','modeprob');
Since some time now, when I try to open these files, I get Error using ==> open at 163 on PC and Error using ==> open at 162 on Mac
I still can open the old files that I saved this way, but not any new files that I saved this way. If I save the figure by clicking 'save' through the GUI it works fine.
I am aware of this thread and I do not have anything new in the path. True, I did download some external toolboxes, but I removed them and I even restored the 'default' path. Now when I use which -all message
I get the same thing that the "best answer" guy got. I tried moving those four to the end but didn't help. Any ideas?
Thanks!

Best Answer

First, you're overwriting figure, don't know if that has anythign to with this, but it certainly isn't a good idea.
Second, I don't get why this should work, modeprob is the handle to the figure right? If so, then you're saving a handle to the figure that will no longer exist.
Third, I recommend using hgsave for this type of thing.
Related Question