MATLAB: How to use the SAVEAS function to save a figure in the ‘pdf’ format in MATLAB 7.4 (R2007a)

figureformatMATLABpdfsaveas

The documentation for the SAVEAS function does not mention the ability to use the pdf file format as the extension when saving figures.

Best Answer

The ability to use the pdf format as an extension along with the SAVEAS function was not documented in MATLAB 7.4 (R2007a) and prior releases. This has been added into the documentation of MATLAB 7.5 (R2007b) and later.
If you are using a previous version of MATLAB you can still use the SAVEAS function in to save as a pdf file similar to other extentions. For example:
saveas(gcf,'filename.pdf');