% Solution to HW problem 1.2 N = 10; % problem dimensionf x = (1:N)/N; % uniform samples between 0 and 1 A = exp(-x'*x); % integration matrix b = 2*(rand(N,1)-0.5); % right hand side (random #'s in [-1,1]) %b = ((1./(1-x)).*(exp(1-x)-1))'; b(end)=1; c = cond(A) f = inv(A)*b subplot(2,1,1); plot(x,f,'r'); subplot(2,1,2); plot(x,b,'b');