function []=hw4_2_13(n) % find the condition number of the matrix in 2.10 E=zeros(n); for i=1:n for j=1:n if (i==j) E(i,j)=i*(n-i+1); elseif (j>i) E(i,j)=E(i,j-1)-i; else E(i,j)=E(j,i); end end end E=1/(n+1)*E; disp('numerical') disp(cond(E)) disp('theoratical') disp(4*n^2/pi^2) % The relative error between the numerical and theoretical value decreases as % n increases.