程序实例:
4 |* z/ G# y6 i9 W[c,h]=contour(Si,thetai,dens,vi,'k','linewidth',1);8 d1 P# z" t8 Q: J7 U2 d. }
texth=clabel(c,h,'manual','fontname','calibri','fontwei','demi','fontsi',14);
* a+ ^' I6 ?7 t+ _; g- xfor m=1:length(texth)- {; M. F' | n7 z
textstr=get(texth(m),'String');
8 k! ~: e u7 r' ` textnum=str2num(textstr);
$ i5 h1 p- z/ c, D# {1 Y7 b textstrnew=num2str(textnum,'%5.2f'); %设置数字格式
2 v, ?6 N) v1 E6 Y( F2 n set(texth(m),'String',textstrnew);
4 b* d' \% U: M: q; {0 ~$ oend
' O& f4 d" ? L. U8 J1 a& `4 E
2 x, m! o4 S( c; j1 x% c) D, O6 M% v |; G2 f
. p4 n# B2 f3 Z) C0 P* X- T, c
1 C# K1 K$ f, D3 U0 t5 w
转载本文请联系原作者获取授权,同时请注明本文来自叶瑞杰科学网博客。 |