Question: The following code is the algorithm of the clc clear all n=3; maxxer=0.001; b=50*rand(n,1); er=1; A=zeros(n,n); A [420;2103:03 2]; b=[12; 7; -3]; x0=[0; 0;
The following code is the algorithm of the clc clear all n=3; maxxer=0.001; b=50*rand(n,1); er=1; A=zeros(n,n); A [420;2103:03 2\]; b=[12; 7; -3\]; x0=[0; 0; 0\]; X=X; while er>maxxer for i=1:n t=0; k=0; end for j=1:1-1 t=t+ (A(ij)/A(i,i))*(x(j)); end for j=i+1:n k=k+(A(i,j)/A(i,i))*(x0()); end x(i)-(b(i)/A(i,i))-t-k; error. er=max(abs(x-x0))/max(abs(x)); XO=X; X end Method with accuracy by checking the
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
