程序实例:7 R* g4 B* r5 N; {, o
[c,h]=contour(Si,thetai,dens,vi,'k','linewidth',1);7 M/ [' P5 K3 k
texth=clabel(c,h,'manual','fontname','calibri','fontwei','demi','fontsi',14);8 W0 Q! _, w/ A
for m=1:length(texth)0 r: `/ t& V5 f; `' A6 E
textstr=get(texth(m),'String');( P- n# l/ ?7 [" N1 Z0 ~
textnum=str2num(textstr);
6 |. A" C& y# i2 E2 N5 _3 ?/ N: @ textstrnew=num2str(textnum,'%5.2f'); %设置数字格式$ V' ^ Y* j3 i
set(texth(m),'String',textstrnew);
. V3 g1 @) k# {3 d% `; M$ Pend
3 C. D6 }* L+ P% N
* `8 l( c5 S; O# G- q* b V: |. `; g! w8 p: ]0 B) G. w+ z6 N+ [
" b E. A8 b- H% f
! m. Z) _1 S! y1 m# c( x 转载本文请联系原作者获取授权,同时请注明本文来自叶瑞杰科学网博客。 |