% The 1 dimension case format long; clear; fprintf('In the 1D case, solve the linear system by direct method.\n'); tic; e1 = OneD_Case(100); t = toc; fprintf('The error with N = 100 is %.8f. The computation takes %.0f seconds of time.\n',e1,t); tic; e2 = OneD_Case(200); 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);