MATLAB: While opening a figure file (.fig) in matlab , I get an error “error using ==> open at 159 invalid figure file format”.

errorfigure filesMATLABundocumented

while opening a figure file (.fig) in matlab , I get an error "error using ==> open at 159 invalid figure file format". Original figure files were made in MATLAB 2015 version but i tried it opening in I tried it in MATLAB 2015, 2008,2007 and none of them worked. i keep getting the error for all the fig. files.

Best Answer

Please post a sample file.
.fig files created by R2014b or later use a different format than earlier versions. I did some research on this a couple of months ago and recall that there is code to allow fairly old files to be opened in new versions, but by default the new files would not be readable by the old. At the moment I do not recall if there is a way of saving for backwards compatibility.
The new files use a completely different data structure than the old to represent graphics so do not expect it to be easy.
Mathworks seldom promises backwards compatibility of object oriented data, only of plain numeric data and character vectors and logical and structures.