%
% Drive program for computing dominant eigenvalue and eigenvector
%
% fin=fopen('matrixA','r');
% suppose A has n rows and n columns
% u=ones(n,1);
% maxnum=25 iterations
% epsilon=0.00001, 1.0E(-5)
%
  A=[0, 11,  -5;  -2,  17,  -7;  -4 26,  -10];
  u=ones(3,1);    % u=[1 1 1]';
  epsilon=0.00001;
  maxnum=25;
  [lambda,v]=powerM(A,u,epsilon,maxnum);
%
% print eigenvalue  lambda
%       eigenvector v'
% lambda=4.0000,
% v'=[0.3244, 0.4867, 0.8111]
  lambda, v'
