MATLAB: Am I unable to load a previously saved .FIG-file in MATLAB 7.10 (R2010a)

errorfigurehgloadhgsaveMATLABpropertywindowstyle

I am trying to open a figure I have previously saved as a .FIG-file. When I try to open it I receive the following error:
??? Error using ==> get
There is no 'WindowStyle' property in the 'surfaceplot' class.
Error in ==> openfig at 108
if ~(strcmpi(get(fig(n), 'WindowStyle'), 'docked'))
What can I do to open the figure correctly?

Best Answer

You can receive this error message when the .FIG-file was saved using HGSAVE on a handle object that is not the figure itself. Please use HGSAVE on figure handles to save a figure that can be loaded with OPENFIG or by double-clicking the .FIG-file.
You can recover the data in the problematic file by using HGLOAD:
hgload('figurefile.fig')
hgsave(gcf, 'figurefile_new.fig')