I am trying to implement the Gauss-Seidel method in MATLAB. But there are two major mistakes in my code, and …