.Gauss列主元消去法求解线性方程组12346212425027,2085113270xxxx迭代法计算停止的条件为:6)()1(3110maxkjkjjxx.采用用用Gauss列主元消去法时,Matlab计算程序为:clearclcA=[2212;413-1;-4-201;2323];B=[1;2;1;0];n=length(B);X=zeros(n,1);c=zeros(1,n);d1=0;fori=1:n-1max=abs(A(i,i));m=i;forj=i+1:nifmaxabs(A(j,i))max=abs(A(j,i));m=j;endendif(m~=i)fork=i:nc(k)=A(i,k);A(i,k)=A(m,k);A(m,k)=c(k);endd1=B(i);B(i)=B(m);B(m)=d1;endfork=i+1:nforj=i+1:nA(k,j)=A(k,j)-A(i,j)*A(k,i)/A(i,i);endB(k)=B(k)-B(i)*A(k,i)/A(i,i);A(k,i)=0;endendX(n)=B(n)/A(n,n);fori=n-1:-1:1sum=0;forj=i+1:nsum=sum+A(i,j)*X(j);endX(i)=(B(i)-sum)/A(i,i);endX计算结果为:X=(1.5417;-2.7500;0.0833;1.6667)