程序实例:
2 A+ Z7 L& R( d) Z[c,h]=contour(Si,thetai,dens,vi,'k','linewidth',1);, ?' E8 s, d! e6 t4 r; B3 |; [
texth=clabel(c,h,'manual','fontname','calibri','fontwei','demi','fontsi',14);
2 r# L2 n; V5 {- Afor m=1:length(texth)
! r0 m( R- m. ], G, B textstr=get(texth(m),'String');
8 i% |4 |& T" P. e# k textnum=str2num(textstr);
. T5 y2 N, t& B, X+ G* e# t textstrnew=num2str(textnum,'%5.2f'); %设置数字格式6 c# P0 R( x8 s' r5 L. x
set(texth(m),'String',textstrnew);
# Y) _; P: d6 e6 e! x, V" cend
7 Y* U$ ^3 e$ D. ~6 M _9 N! J8 {3 V8 B) ^/ t
9 G7 z) x7 Z4 E& ?6 m
2 T, P! A' r+ u: b. A
+ M8 H% [' \; G9 V+ G- g9 l 转载本文请联系原作者获取授权,同时请注明本文来自叶瑞杰科学网博客。 |