%% Power iteration
A = [-2, 1, 0; 1,-2,1;0,1,-2]
x=[1;0;0]
for i=1:19,
    y = A*x
    x = y/norm(y,2)
end