Saving a file in a folder

1 次查看(过去 30 天)
SEVAL DONERTAS
SEVAL DONERTAS 2019-2-20
Hi;
How can I save a file in a folder with a .FIG and .PNG extension in Matlab?
Actually I want to save the file in a folder by writing a Matlab code.
Regards,

回答(2 个)

MD RAQUIBUZZAMAN
MD RAQUIBUZZAMAN 2019-2-20
f=plot(x,y);
saveas(f,'name.fig')
or you can directly use
savefig('name.fig')
  1 个评论
SEVAL DONERTAS
SEVAL DONERTAS 2019-2-20
Hi,
Thank you very much..
When I use this script; the file is saved. But axes labels, title and legend are disappeared. I am attaching my code and a txt file. What can be the problem?
Regards,

请先登录,再进行评论。


MD RAQUIBUZZAMAN
MD RAQUIBUZZAMAN 2019-2-20
when you open the saved file, you need to use 'openfig' or open name.fig. It will load all the text and the legends.
  1 个评论
SEVAL DONERTAS
SEVAL DONERTAS 2019-2-22
Hi,
I have tried but I could not execute correctly.. Could you please write the code a bit more clearly?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Printing and Saving 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by