Printing and Exporting Figures with MATLAB | ![]() ![]() |
Exporting to a File Using MATLAB Commands
To export to file, specify a format (as discussed in Exporting to a File Using MATLAB Commands, above) and include a filename. This example exports the current figure to a PNG file.
Some formats, such as EPS, have additional options. This example exports the current figure to a color level 2 EPS file and includes an optional TIFF preview image.
See Setting the Export File Format for a table of formats that have additional options.
It is not necessary to include a file extension; MATLAB will infer it from the format you specify.
![]() | Specifying Options | Exporting to the Clipboard Using MATLAB Commands | ![]() |