Index exceeds matrix dimensions.什么错误啊?
来源:学生作业帮 编辑:大师作文网作业帮 分类:英语作业 时间:2024/11/12 08:04:46
Index exceeds matrix dimensions.什么错误啊?
a=zeros(8);
l=zeros(8);
u=zeros(8);
for (i=2:8)
a(i,i)=5;
a(i,i-1)=-2;
a(i-1,i)=-2;
l(i,i)=1;
end
a(1,1)=2;
l(1,1)=1;
u(1,1)=a(1,1);
for (i=2:8)
l(i,i-1)=a(i,i-1)/u(i-1,i-1);
u(i,i)=b(i,i)-c(i-1,i)*l(i,i-1);
end
a
l
u
d=[220/27 0 0 0 0 0 0 0];
d=d';
y=(l^(-1))*d;
x=(u^(-1))*y;
x
a=zeros(8);
l=zeros(8);
u=zeros(8);
for (i=2:8)
a(i,i)=5;
a(i,i-1)=-2;
a(i-1,i)=-2;
l(i,i)=1;
end
a(1,1)=2;
l(1,1)=1;
u(1,1)=a(1,1);
for (i=2:8)
l(i,i-1)=a(i,i-1)/u(i-1,i-1);
u(i,i)=b(i,i)-c(i-1,i)*l(i,i-1);
end
a
l
u
d=[220/27 0 0 0 0 0 0 0];
d=d';
y=(l^(-1))*d;
x=(u^(-1))*y;
x
下标越界.除零了吧
再问: 能具体解释一下么,小弟是新手。。。
再答: 数组定义8(长度).下标是否0..7?
再问: 能具体解释一下么,小弟是新手。。。
再答: 数组定义8(长度).下标是否0..7?
Index exceeds matrix dimensions.什么错误啊?
matlab中Index exceeds matrix dimensions.错误
MATLAB 中 Index exceeds matrix dimensions.错误
Index exceeds matrix dimensions.
matlab Index exceeds matrix dimensions.
matlab中,Index exceeds matrix dimensions错误问题
matlab中Index exceeds matrix dimensions
为什么会出现Index exceeds matrix dimensions
Matlab计算Index exceeds matrix dimensions.为什么?
MATLAB Index exceeds matrix dimensions问题
Matlab计算Index exceeds matrix dimensions.为什么?...
matlab的问题?Index exceeds matrix dimensions.