查看单个帖子
旧 2009-04-02, 20:19   #1
runforever
初级会员
 
注册日期: 2009-04-02
年龄: 38
帖子: 1
声望力: 0
runforever 正向着好的方向发展
默认 求助以下的if语句

if r>=1
Pout(i)=rou(i)^(r-2);
elseif r<1
Pout(i)=rou(i)^(3*r-4)
end
其中rou=[1:10:100000];
r=1.5
编译时出现如下错误:
??? Subscript indices must either be real positive integers or logicals.

Error in ==> Pout_r at 18
Pout(i)=rou(i)^(r-2);
求教大侠
runforever 当前离线   回复时引用此帖