程序实例:
6 i7 |- p& v! u/ }4 p E[c,h]=contour(Si,thetai,dens,vi,'k','linewidth',1);8 R6 E. n2 J5 B8 L8 C! h
texth=clabel(c,h,'manual','fontname','calibri','fontwei','demi','fontsi',14);1 `# \, m3 {% l
for m=1:length(texth) f0 H# I+ V0 U' V9 a/ G
textstr=get(texth(m),'String'); t' N( y% Y8 E4 h: w- {
textnum=str2num(textstr);
: f1 \' ^" H$ j! b* g$ W textstrnew=num2str(textnum,'%5.2f'); %设置数字格式1 ]" f( `# }9 E% X. X- H* A
set(texth(m),'String',textstrnew);
& p9 \' Y; }1 j/ F$ n) F' Wend! r8 ?' S2 |; V" s) J- f8 |, W! x8 ^
: a+ ?+ j* Q, M9 ^/ F
" Y9 s8 _/ }. O, q3 p! K
$ B) `6 x9 l$ u
/ y+ ~0 s- q4 ^( n$ b 转载本文请联系原作者获取授权,同时请注明本文来自叶瑞杰科学网博客。 |