程序实例:* i9 p5 ^& A7 F5 G* }8 p
[c,h]=contour(Si,thetai,dens,vi,'k','linewidth',1);
( r* j) Y# }, ~/ a' U" }) A5 e+ T$ ftexth=clabel(c,h,'manual','fontname','calibri','fontwei','demi','fontsi',14);
9 Q* ]0 J" g0 _* s9 g2 ]* h( Bfor m=1:length(texth)& Y% V$ H$ h- N M2 v
textstr=get(texth(m),'String');4 \5 s. R& z4 G
textnum=str2num(textstr);( `* @8 @6 c. [& ~8 r
textstrnew=num2str(textnum,'%5.2f'); %设置数字格式. h# w" {5 j6 [7 i2 J. w
set(texth(m),'String',textstrnew);
6 r7 [- @! k) F+ j0 ~end; u9 k |4 p; F$ |& B( e# B u8 J
$ I: m- t# ?- I3 c2 D, c! \9 W& d Z$ S8 H
5 ~9 s/ y9 T6 `' q ?
/ r1 M& N7 J. L+ k7 j ^ 转载本文请联系原作者获取授权,同时请注明本文来自叶瑞杰科学网博客。 |