问题描述:
matlab问题求救 In an assignment A(I) = B,the number of elements in B and I must be the same.
A=[10,-1,0;-1,10,-2;0,-2,10];b=[9,7,6];x(1)=[0,0,0];r=10^(-6);omiga=0.8;N=1000;
x=x(1);
for k=1:N
x(i)=omiga*(b(i)-A(i,:)*x)/A(i,i)+x(i);
if norm(x-x(1))
A=[10,-1,0;-1,10,-2;0,-2,10];b=[9,7,6];x(1)=[0,0,0];r=10^(-6);omiga=0.8;N=1000;
x=x(1);
for k=1:N
x(i)=omiga*(b(i)-A(i,:)*x)/A(i,i)+x(i);
if norm(x-x(1))
问题解答:
我来补答展开全文阅读