clear all;

A = [1 1; 1 0];
init=[1; 1];

% calculate 100th (and 99th) Fibonacci number
f100=A^100*init

[V, D]=eig(A); % eigenvalues not sorted according to magnitude

[vecs,vals]=eigs(A); % eigenvalues sorted in descending order of magnitude

% 1st column of vecs is the eigenvector corresponding to the eigenvalue of greatest magnitude
limitratio=vecs(1,1)/vecs(2,1)