回 帖 发 新 帖 刷新版面

主题:请教:Index exceeds matrix dimensions.

下面是我编的一个做等高图的程序:
clear
h=0.539;
u=50.*10.^(-3);
d=200;
[x,y] = meshgrid(0.0045:0.0002:0.1,0:0.0002:0.1);
a=sqrt((sqrt(x.^2+y.^2).*h+u).^2./h.^2-y.^2);
t=log(x.^2./(x.^2+(y.^2).*sin(a.*d).^(2)));
contourf(x,y,t);
colorbar('vert');

运行后总提示:
??? Index exceeds matrix dimensions.

Error in ==> specgraph.contourgroup.schema>LdoDirtyAction at 256
  refresh(h);

??? Error occurred while evaluating listener callback.

去掉"t=log(x.^2./(x.^2+(y.^2).*sin(a.*d).^(2)));"中的log后就不会出现这种情况.不知道是什么原因,该怎样处理.请大家帮忙.先谢了!

回复列表 (共1个回复)

沙发

自己顶.

我来回复

您尚未登录,请登录后再回复。点此登录或注册