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?

 Réponse acceptée

madhan ravi
madhan ravi le 13 Déc 2018
Modifié(e) : madhan ravi le 13 Déc 2018

0 votes

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

Plus de réponses (1)

YT
YT le 13 Déc 2018
Modifié(e) : YT le 13 Déc 2018

0 votes

Well I don't think you can call saveas with an output argument which is why it gave you the error (see saveas documentation here). Just remove it and it will probably be fine
saveas(gcf,'objective.pdf');

Catégories

En savoir plus sur Printing and Saving dans Centre d'aide et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by