function []=hw3_2_11(n) % find the inverse of E in problem 2.10, try inputting values of n of 20 and 50 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; EI=inv(E); % compare to the actual inverse, AI. norm(AI-EI) is like the "distance" between % the two matrices, it should be small AI=diag(-ones(1,n-1),-1)+diag(2*ones(1,n))+diag(-ones(1,n-1),1); norm(AI-EI)