MATLAB: How to save file as pdf

imagescpdfplotsaveas

imagesc(x,y,img), colorbar, %color plot
objectiveoutput = saveas(gcf,'objective.pdf'); %saving image as pdf
The above is a plot i wish to save however I am receiving the error that there is too many outputs.
Any help?

Best Answer

saveas(gcf,'objective.pdf') % without objectiveoutput =
Related Question