马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
请手指点一下如下代码的错误,运行后提示为 ??? Index exceeds matrix dimensions.
花了好长时间找不出错误的地方
t0=0;
t1=250;
t=t1-t0;
if t0==0
y2=inline('10*(1-0.5*tanh(0.1*(tau-65))+0.5*tanh(0.1*(tau-185)))');
k=0.003;
h=0.01;
z0=-50;
z1=150;
z=z1-z0;
m0=(z/h)+1;
Z=linspace(z0,z1,m0);
g=1.0;
r=0;
r1=1.0;
d1=0.5;
d2=0.5;
Pba1(1,:)=0;
Pba2(1,:)=0;
Pbc1(1,:)=0;
Pbc2(1,:)=0;
Pac1(1,:)=0;
Pac2(1,:)=0;
Paa1(1,:)=0;
Pbb1(1,:)=1;
Pcc1(1,:)=0;
a0=0.05;
seita=0;
A1(1,:)=0.1;
A2(1,:)=0;
T1(1,1)=0;
t2=1;
A(t2,1:201)=(A1(1,1:100:m0).^2+A2(1,1:100:m0).^2).^0.5;
A11(t2,1:201)=A1(1,1:100:m0);
A12(t2,1:201)=A2(1,1:100:m0);
[Vm(t2,1),YY(t2,1)]=max((A1(1,:).^2+A2(1,:).^2).^0.5);
Z1(t2,1)=50+(YY(t2,1)-1)*h;
Pbc(t2,1:201)=(Pbc1(1,1:100:m0).^2+Pbc2(1,1:100:m0).^2).^0.5;
Pbc11(t2,1:201)=Pbc1(1,1:100:m0);
Pbc12(t2,1:201)=Pbc2(1,1:100:m0);
Um(t2,1)=max(Pbc(t2,1:201));
Pba(t2,1:201)=(Pba1(1,1:100:m0).^2+Pba2(1,1:100:m0).^2).^0.5;
Pbc(t2,1:201)=(Pbc1(1,1:100:m0).^2+Pbc2(1,1:100:m0).^2).^0.5;
Pba11(t2,1:201)=Pba1(1,1:100:m0);
Pba12(t2,1:201)=Pba2(1,1:100:m0);
Pcc(t2,1:201)=Pcc1(1,1:100:m0);
Paa(t2,1:201)=Paa1(1,1:100:m0);
Pbb(t2,1:201)=Pbb1(1,1:100:m0);
T(t2,1)=T1(1,1);
PHI(t2,1:201)=A(t2,1:201).^2;
Wphi(t2,1)=max(PHI(t2,1:201).^0.5);
save OBdate t1 t2 T A Z Pbc PHI Paa Pbb Pcc Pba Pac Vm Um Wphi YY Z1 Pbc11 Pbc12 Pba11 Pba12 A11 A12
end
??? Index exceeds matrix dimensions.
[ 本帖最后由 eight 于 2007-10-1 23:13 编辑 ] |