clear all
A = [-5 -5 10 1;5 5 -4 5; -1 8 -1 -1;7 -2 1 1];
A = A/9;
eig(A)
x0 = rand(4,1); x = zeros(4,101);X = zeros(101,1);
x(:,1) = x0;
n = 1:100;
X(1) = norm(x0);
for i = 1:100
    x(:,i+1) = A*x(:,i);
    X(i+1) = norm(x(:,i+1));
end
r = X(2:101)./X(1:100);
plot(n,r,'r*')