% The 2 dimension case format long; clear; fprintf('In the 2D case, solve the linear system by SOR method.\n'); tic; e1 = TwoD_Case(100,1.59); t = toc; fprintf('The error with N = 100 is %.8f. The computation takes %.0f seconds of time.\n',e1,t); tic; e2 = TwoD_Case(200,1.69); t = toc; fprintf('The error with N = 200 is %.8f. The computation takes %.0f seconds of time.\n',e2,t); p = log2(e2/e1); fprintf('The error of the numerical method is O(N^%.0f).\n\n',p);