Index exceeds matrix dimensions 出错求助
Using Toolbox Path Cache.Type "help toolbox_path_cache" for more info.To get started, select "MATLAB Help" from the Help menu.
>> u_w=692
u_f=390
cgema_w=13.84
cgema_f=27.3
w(1)=u_w
f(1)=u_f
beta(1)=0.5
beta(2)=1.0
aerfa_f(1)=-w(1)*cgema_f/((w(1)*cgema_f)^2+(f(1)*cgema_w)^2)^0.5
aerfa_w(1)=-f(1)*cgema_w/((w(1)*cgema_f)^2+(f(1)*cgema_w)^2)^0.5
f(1)=u_f+aerfa_f(1)*beta(1)*cgema_f
w(1)=u_w+aerfa_w(1)*beta(1)*cgema_w
aerfa_f(2)=-w(2)*cgema_f/((w(2)*cgema_f)^2+(f(2)*cgema_w)^2)^0.5
aerfa_w(2)=-f(2)*cgema_w/((w(2)*cgema_f)^2+(f(2)*cgema_w)^2)^0.5
f(2)=u_f+aerfa_f(2)*beta(2)*cgema_f
w(2)=u_w+aerfa_w(2)*beta(2)*cgema_w
i=2
while (z(i)>5)
beta(i+1)=beta(i)-z*(beta(i)-beta(i-1)/(z(i)-z(i-1))
aerfa_f(i+1)=-w(i)*cgema_f/((w(i)*cgema_f)^2+(f(i)*cgema_w)^2)^0.5
aerfa_w(i+1)=-f(i)*cgema_w/((w(i)*cgema_f)^2+(f(i)*cgema_w)^2)^0.5
f(i+1)=u_f+aerfa_f(i)*beta(i+1)*cgema_f
w(i+1)=u_w+aerfa_w(i)*beta(i+1)*cgema_w
z(i)=f(i)*w(i)-210000
i=i+1
end
u_w =
692
u_f =
390
cgema_w =
13.8400
cgema_f =
27.3000
w =
692
f =
390
beta =
0.5000
beta =
0.5000 1.0000
aerfa_f =
-0.9615
aerfa_w =
-0.2747
f =
376.8752
w =
690.0989
??? Index exceeds matrix dimensions.
>> 我是初学者,请教!
[ 本帖最后由 eight 于 2007-10-11 11:39 编辑 ] 原帖由 lyj_hit 于 2007-10-11 11:37 发表 http://www.chinavib.com/forum/images/common/back.gif
Using Toolbox Path Cache.Type "help toolbox_path_cache" for more info.
To get started, select "MATLAB Help" from the Help menu.
>> u_w=692
u_f=390
cgema_w=13.84
cgema_f=27.3
w(1)=u_ ...
请看看本版置顶帖,认真阅读 :@)刚注册的 ,呵呵 Error: ")" expected, "end of line" found.
??? Index exceeds matrix dimensions.
这两个错误怎么办了
初学者,见笑 第一个无非就是少了一个)
自己慢慢查吧 把它写成一个m文件 断点慢慢调试
即使你最后不能找到错误 在这过程中 你也会学到很多 原帖由 lyj_hit 于 2007-10-11 12:05 发表 http://www.chinavib.com/forum/images/common/back.gif
Error: ")" expected, "end of line" found.
??? Index exceeds matrix dimensions.
这两个错误怎么办了
初学者,见笑
初学的话,建议找本基础书先看看,这样可以减少很多无谓的错误
回复 #5 jimin 的帖子
谢谢
页:
[1]