clear all n=100; A = rand(n,n); x=ones(n,1); b= A*x; [xg,FLAG,RELRES,ITER] = gmres(A,b,60,1e-8,2000); norm(xg -x, inf) ITER norm(A*xg-b,inf)