程序实例:
2 X8 d. ?0 f+ [4 ^3 r$ Y2 m[c,h]=contour(Si,thetai,dens,vi,'k','linewidth',1);
. P9 e) Y. o9 Q& u* `" C: [texth=clabel(c,h,'manual','fontname','calibri','fontwei','demi','fontsi',14);
8 c7 [/ E+ ]4 S8 S2 ] Z( ] vfor m=1:length(texth)# O. v% \7 n( y0 d+ @
textstr=get(texth(m),'String');
; s8 r# V1 h0 ` textnum=str2num(textstr);
( K. P/ N' a: D) ` textstrnew=num2str(textnum,'%5.2f'); %设置数字格式
% ]- p# H5 j# L: u% N set(texth(m),'String',textstrnew);
7 [, a% h" J" Pend3 c8 S, A/ X# }/ L) o, {
3 r8 P5 L! m0 E5 A8 p% k
: s( y* g1 s3 m! c( m
8 e7 E3 Y1 S3 c ?0 w1 B3 w; T5 R8 c
! _3 v/ @! t' P 转载本文请联系原作者获取授权,同时请注明本文来自叶瑞杰科学网博客。 |