Saving Figures
Save a figure by selecting Save from the File menu to display a file save dialog. MATLAB saves the data it needs to recreate the figure and its contents (i.e., the entire graph) in a file with a .fig extension.
To save a figure using a standard graphics format, such as TIFF, for use with other applications, select Export Setup from the File menu. You can also save from the command line -- use the saveas command, including any options to save the figure in a different format. The more restricted hgexport command, which saves figures to either bitmap or metafile files, depending on the rendering method in effect, is also available.
See Exporting the Graph for an example.
Saving Workspace Data
You can save the variables in your workspace using the Save Workspace As item in the figure File menu. You can reload saved data using the Import Data item in the figure File menu. MATLAB supports a variety of data file formats, including MATLAB data files, which have a .mat extension.
Generating M-Code to Recreate a Figure
You can generate MATLAB code that recreates a figure and the graph it contains by selecting the Generate M-File item from the figure File menu. This option is particularly useful if you have developed a graph using plotting tools and want to create a similar graph using the same or different data.
Saving Figures That Are Compatible with Previous Version of MATLAB
Create backward-compatible FIG-files by following these two steps: Ensure that any plotting functions used to create the contents of the figure are called with the 'v6' argument, where applicable. Use the '-v6' option with the hgsave command. For More Information See Plot Objects and Backward Compatibility in the MATLAB documentation more information.