function X = gssor(A,b,n) % usage: X = gssor(A,b,n) % description: given invertible mxm A and mx1 b != 0, % this function calculates n steps of GS-SOR, and % returns mxn X containing the first n % approximates to solution of A*x = b. We do not count % the 0th, which is x^(0) = 0. % local variables: % ii: index variables m = length(b); X = zeros(m,n); x = zeros(m,1); % finish it