% Matlab diary from cs110a class #7, Jan 19 2005. % % This is what I typed in class. % % Type it into Matlab yourself to % reproduce the output I showed. A = golub(7) b = rand(7,1) x = A \ b r = b - A*x A b = A * [1; 1; 1; 1; 1; 1; 1] sum(A,1) sum(A,2) x = A \ b xstar = ones(7,1) error = x - xstar lugui(A) residual = A*x - b A x norm(x) sqrt(7) norm(ones(7,1)) error residual norm(error) norm(residual) norm(x,1) norm(x,inf) norm(error,1) norm(residual,1) norm(residual) norm(error) cond(A)