yelv123 发表于 2008-4-23 13:52

Matrix dimensions must agree 出错求助

用下面语句执行

x=0.1:0.1:10;
y=x;
=meshgrid(x,y);
mesh(x,y,150/sqrt((x*0.85*0.85+y*0.9*0.9)/(x+y)))

结果为

Warning: Matrix is close to singular or badly scaled.
         Results may be inaccurate. RCOND = 2.288462e-022.
(Type "warning off MATLAB:nearlySingularMatrix" to suppress this warning.)
??? Error using ==> /
Matrix dimensions must agree.


这该怎么处理一哈??

[ 本帖最后由 eight 于 2008-4-23 15:16 编辑 ]

w89986581 发表于 2008-4-23 14:03

没有猜错的话,你想使用的./而不是/

yelv123 发表于 2008-4-23 14:10

原帖由 w89986581 于 2008-4-23 14:03 发表 http://www.chinavib.com/forum/images/common/back.gif
没有猜错的话,你想使用的./而不是/
x=0.1:0.1:10;
y=x;
=meshgrid(x,y);
mesh(x,y,150/sqrt((x*0.85*0.85+y*0.9*0.9)./(x+y)))

出来


??? Error using ==> /
Matrix dimensions must agree.

ch_j1985 发表于 2008-4-23 14:23

原帖由 yelv123 于 2008-4-23 14:10 发表 http://www.chinavib.com/forum/images/common/back.gif

x=0.1:0.1:10;
y=x;
=meshgrid(x,y);
mesh(x,y,150/sqrt((x*0.85*0.85+y*0.9*0.9)./(x+y)))

出来


??? Error using ==> /
Matrix dimensions must agree.

试试这个:
mesh(x,y,150./sqrt((x*0.85*0.85+y*0.9*0.9)./(x+y)))

wwbeyondww 发表于 2008-4-23 14:23

回复 3楼 的帖子

x=0.1:0.1:10;
y=x;
=meshgrid(x,y);
mesh(x,y,150./sqrt((x*0.85*0.85+y*0.9*0.9)./(x+y)));

eight 发表于 2008-4-23 15:17

老掉牙的问题了,自己好好看书,或者看置顶区 for 新手系列 的帖子,此帖关闭处理
页: [1]
查看完整版本: Matrix dimensions must agree 出错求助