save GUI figure in matlab

為{幸葍}努か 提交于 2019-11-29 17:27:17

One of the quick and dirty approaches

myGUI = quadratic;
% ......
% do something or wait until it's done...
% ......
print(myGUI, '-dpng', 'GUIOUT.png'); % save as .png
print(myGUI, '-djpeg', 'GUIOUT.jpg'); % save as .jpg

It will work fine if you only take a screenshot.

However, if you encounter the problem for which the output picture does not have the same size as the figure on your screen (especially when saving as pdf), you will probably have to implement solutions describled in this article.

or even better using fig2file may work for you.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!