程序实例:9 n7 C# h: l* ?$ g( l/ v% x
[c,h]=contour(Si,thetai,dens,vi,'k','linewidth',1);
3 ]' @) ^# [( z Rtexth=clabel(c,h,'manual','fontname','calibri','fontwei','demi','fontsi',14);
& _0 I3 n6 Y6 m5 E9 A& @1 \for m=1:length(texth)
- @: t. b# }8 m& Q) j- o textstr=get(texth(m),'String');
2 t' V5 Y$ `/ Z0 b textnum=str2num(textstr);
& ^; J; t3 C0 g, Y textstrnew=num2str(textnum,'%5.2f'); %设置数字格式2 m8 j8 ` \1 F# k6 A, {' R3 c& r
set(texth(m),'String',textstrnew);
% p; ?& c* K: M. N# Dend
X+ D% A [0 g3 q `* B
" N6 g& L d( y
/ S- U$ q8 c) l
; Q6 g+ u2 h! H% f! |% B( Y. @+ }+ ~' Q/ P0 r
转载本文请联系原作者获取授权,同时请注明本文来自叶瑞杰科学网博客。 |