程序实例:
! y8 y/ W+ {( R# I) ]& g( _[c,h]=contour(Si,thetai,dens,vi,'k','linewidth',1);" m5 [3 i) [) Y' D6 {; f
texth=clabel(c,h,'manual','fontname','calibri','fontwei','demi','fontsi',14);
! H. Y0 p4 b5 c- G2 ~2 Vfor m=1:length(texth)$ q- P; y3 \: _ I7 V
textstr=get(texth(m),'String');
s# L( G. j+ B+ d' ^ textnum=str2num(textstr);
0 v) d9 }+ z5 v4 E& j9 e) x; p textstrnew=num2str(textnum,'%5.2f'); %设置数字格式
. p b" s2 g" r0 ^ set(texth(m),'String',textstrnew);
+ G9 V ^! R8 I" e2 A4 X3 }2 S0 `end
% d+ x7 T/ U7 _" s7 U5 _( U) y) D/ a- ]- a( Z' x
5 v$ i+ j8 a# _/ M
( t$ e8 t- K! ?$ J- l* u
% Y$ c3 T, j( F, `( [5 f
转载本文请联系原作者获取授权,同时请注明本文来自叶瑞杰科学网博客。 |