% Session p. 156

session_p148

tol = 1e-11; kmax = 5819;
[x,fail,r,k] = pcg(A,b,tol,kmax);
if not(fail), k, x1 = x(1), err = r/x1, end
