when a save figure , the numbers appear in the name of the png with e+0X
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Lazaros Christoforidis
el 29 de Mzo. de 2020
Comentada: Les Beckham
el 29 de Mzo. de 2020
e.g. oo=1; tspend(oo,1)=10.472;
saveas(fig1,[pwd sprintf('/Figures/Distance_%d@%d.png',oo,tspend(oo,1))]);
%The png saved as: Distance_1@1.047200e+01.png
%I wanted to displayed as: Distance_1@10.472.png
0 comentarios
Respuesta aceptada
Les Beckham
el 29 de Mzo. de 2020
Change your format spec to
'/Figures/Distance_%d@%.3f.png'
You might want to read up on the documentation for this: https://www.mathworks.com/help/matlab/ref/sprintf.html#btf_bfy-1_sep_shared-formatSpec
2 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Printing and Saving en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!