Please answer in Matlab, thank you!

Ans)
%====================MATLAB CODE=============
%====question1====
A=[10 2 -2;4 2 -1;2 -3 10];
b=[18;-10;5];
sol=Gauss_seidel(A,b)
%====question2====
A=[4 -1 -1;-2 6 1;-1 1 7];
b=[3;9;-6];
sol=Gauss_seidel(A,b)
%====question3====
A=[4 1 -1;2 7 1;1 -3 12];
b=[3;19;31];
sol=Gauss_seidel(A,b)
%====question4====
A=[25 5 1;64 8 1;144 12 1];
b=[106.8;177.2;279.2];
sol=Gauss_seidel(A,b)
function X=Gauss_seidel(A,b)
n = length(b);
X = zeros(n,1);
Error_eval = ones(n,1);
%% Start the Iterations
iteration = 0;
while max(Error_eval) > 0.001
iteration = iteration + 1;
Z = X; % save current values to calculate error later
for i = 1:n
j = 1:n; % define an array of the coefficients' elements
j(i) = []; % eliminate the unknow's coefficient from the remaining coefficients
Xtemp = X; % copy the unknows to a new variable
Xtemp(i) = []; % eliminate the unknown under question from the set of values
X(i) = (b(i) - sum(A(i,j) * Xtemp)) / A(i,i);
end
Xsolution(:,iteration) = X;
Error_eval = sqrt((X - Z).^2);
end
end
%========================================


Please answer in Matlab, thank you! Gauss-Seidel method Exercise: 1. Find the roots of following simultaneous...
Solve the following equation by Gauss-Seidel Method up to 2 iterations and find the value of z. X1 + X2 + 25x3 10 6x1 + 15x2 + 2x3 -8 10x1 + 6x2 – X3 = 6 Give answer in 3-decimal plates.(Like 1.222) = r Answer: