How can I extract data from a .fig file in MATLAB?

sylvester picture sylvester · Jun 4, 2010 · Viewed 64.4k times · Source

I know this is really basic, but I am new to MATLAB. After opening a .fig file, how do you actually work with the plotted data in the command window? All I see is the plot. I'm not sure how to actually get the data.

Answer

Yair Altman picture Yair Altman · Dec 11, 2010

Actually, you don't even have to display the figure in order to get the data. FIG files are stored in the standard Matlab MAT format, that you can read using the built-in load() function. The figure handles and data are stored in a structure that you can easily understand and process.