matlab contour 标注问题

kb=1.38e-23;T=300;pi=3.1415926;w0=2*pi*743;M=37.25e-6;g=9.8;Q=[0.1:0.01:100];Cmin=[1:... kb=1.38e-23;
T=300;
pi=3.1415926;
w0=2*pi*743;
M=37.25e-6;
g=9.8;
Q=[0.1:0.01:100];
Cmin=[1:1:10].*1e-18;
[X,Y]=meshgrid(Q,Cmin);
BNEA=sqrt(4*kb*T*w0/M./X)/g;
e0=8.85e-12;
A=13.69e-6;
d0=1.5e-6;
Scd=2*e0*A*g/d0^2/w0^2;
CNEA=Y./Scd;
TNEA=(CNEA.^2+BNEA.^2).^0.5;
%surf(X,Y,TNEA)
%meshc(X,Y,TNEA);

[C,h] = contour(X,Y,TNEA,8);
clabel(C,h,'FontSize',10,'Color','r')

。。。。。。。。。。。。。。

不知道怎么控制消暑点的位数,这个标注出来的有效数字太多。想改为小数点后两位。另外科学计数法后面的e-007能否缩短为e-7
展开
 我来答
gmg31ifl
2011-03-31 · TA获得超过595个赞
知道小有建树答主
回答量:651
采纳率:0%
帮助的人:0
展开全部
'属性可以调整标注的疏密,加入参数'manual'可以手动指定标注的位置。

>> help clabel
CLABEL Contour plot elevation labels.
CLABEL(CS,H) adds height labels to the contour plot specified by H.
The labels are rotated and inserted within the contour lines. CS and H
are the contour matrix output and object handle outputs from CONTOUR,
CONTOUR3, or CONTOURF.

CLABEL(CS,H,V) labels just those contour levels given in
vector V. The default action is to label all known contours.
The label positions are selected randomly.

CLABEL(CS,H,'manual') places contour labels at the locations
clicked on with a mouse. Pressing the return key terminates
labeling. Use the space bar to enter contours and the arrow
keys to move the crosshair if no mouse is available.

CLABEL(CS) or CLABEL(CS,V) or CLABEL(CS,'manual') places
contour labels as above, except that the labels are drawn as
plus signs on the contour with a nearby height value.

H = CLABEL(...) returns handles to the TEXT (and possibly LINE)
objects in H. The UserData property of the TEXT objects contain
the height value for each label.

CLABEL(...,'text property',property_value,...) allows arbitrary
TEXT property/value pairs to specified for the label strings.

One special property ('LabelSpacing') is also available to specify
the spacing between labels (in points). This defaults to 144, or
2 inches.

Uses code by R. Pawlowicz to handle inline contour labels.

Example
subplot(1,3,1), [cs,h] = contour(peaks); clabel(cs,h,'labelspacing',72)
subplot(1,3,2), cs = contour(peaks); clabel(cs)
subplot(1,3,3), [cs,h] = contour(peaks);
clabel(cs,h,'fontsize',15,'color','r','rotation',0)

See also contour, contour3, contourf.

Reference page in Help browser
doc clabel
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
结构风工程资源
2018-06-02
知道答主
回答量:1
采纳率:0%
帮助的人:893
展开全部

直接用

[s,h]=contour(X,Y,Z,20);
h_clabel=clabel(s,h)

得到

如果改为

v=[-40:20:160]
[s,h]=contour(X,Y,Z,v
h_clabel=clabel(s,h);  

则变成

已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 1条折叠回答
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式