Why am I unable to load a previously saved .FIG-file in MATLAB 7.10 (R2010a)?

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?

 Accepted 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')

More Answers (0)

Categories

Find more on Printing and Saving in Help Center and File Exchange

Products

Release

R2010a

Community Treasure Hunt

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

Start Hunting!