Saving a file in a folder

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,

Respuestas (2)

MD RAQUIBUZZAMAN
MD RAQUIBUZZAMAN el 20 de Feb. de 2019

0 votos

f=plot(x,y);
saveas(f,'name.fig')
or you can directly use
savefig('name.fig')

1 comentario

SEVAL DONERTAS
SEVAL DONERTAS el 20 de Feb. de 2019
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,

Iniciar sesión para comentar.

MD RAQUIBUZZAMAN
MD RAQUIBUZZAMAN el 20 de Feb. de 2019

0 votos

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 comentario

SEVAL DONERTAS
SEVAL DONERTAS el 22 de Feb. de 2019
Hi,
I have tried but I could not execute correctly.. Could you please write the code a bit more clearly?

Iniciar sesión para comentar.

Categorías

Más información sobre Printing and Saving en Centro de ayuda y File Exchange.

Preguntada:

el 20 de Feb. de 2019

Comentada:

el 22 de Feb. de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by