when a save figure , the numbers appear in the name of the png with e+0X

조회 수: 1 (최근 30일)
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

채택된 답변

Les Beckham
Les Beckham 2020년 3월 29일
Change your format spec to
'/Figures/Distance_%d@%.3f.png'

추가 답변 (0개)

카테고리

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