function powerm(A,x0,nmax)
% A - The matrix 
% x0 - The initial starting guess
% nmax - The number of iterations
x = x0;
for n = 1:nmax
xnew = A * x ;
lambda = norm(xnew,inf)/norm(x,inf);
fprintf('n = %4d  |lambda|: %g\n', n, lambda);
x = xnew;
end
end
