程序实例:3 |; S1 n+ t/ }8 T0 F
[c,h]=contour(Si,thetai,dens,vi,'k','linewidth',1);9 G$ L, h4 v7 z8 D+ f
texth=clabel(c,h,'manual','fontname','calibri','fontwei','demi','fontsi',14);: D, p- t5 K, E& e- v
for m=1:length(texth)
0 Y- f2 z' S" L textstr=get(texth(m),'String');
| e# Z5 s$ }, U# { textnum=str2num(textstr);
( L. j' P7 b; f5 m7 j, \ textstrnew=num2str(textnum,'%5.2f'); %设置数字格式
9 D8 Z r* e: k set(texth(m),'String',textstrnew);
1 o" u U, |! k4 q. Send
* u1 D0 e( j5 \4 v) C% ?
7 e2 Z: y* l( V" L M e0 Q5 K
: f. i7 W8 o: D9 V/ G7 D & y: w8 Y% F' }9 \& `3 Z
" N. ?, N. f6 Y" E2 }
转载本文请联系原作者获取授权,同时请注明本文来自叶瑞杰科学网博客。 |