How to change .fig name when I use savefig

2 visualizaciones (últimos 30 días)
Seok Min Lee
Seok Min Lee el 5 de Sept. de 2020
Comentada: Stephen23 el 5 de Sept. de 2020
I want to save mat file to fig file
like this
```
I have 00001.mat , 000002.mat ... file
and I want to save file like 00001.fig, 000002.fig
There is my code
mat_file = dir
name = mat_file(3).name %setdata
[filename,fileformat] = strsplit(name,'.')
load(name)
mat2stft
[S,F,T] = stft(a)
h = pcolor(T,F,abs(S))
set(h,'EdgeColor','none');
axis tight off
stft2fig
figname = strcat(filename(1),'.fig')
savefig((figname))
  2 comentarios
Seok Min Lee
Seok Min Lee el 5 de Sept. de 2020
savefig((figname)) is error.. How to fix it!?
Stephen23
Stephen23 el 5 de Sept. de 2020
"savefig((figname)) is error.. How to fix it!?"
That depends on what the error is. It might be that the location is write protected, or the name is not valid, or all sorts of things can prevent a file from being saved. We don't know what the reason is, because you did not show the error message.
Please show the complete error message. This means all of the red text.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Printing and Saving en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by