function [  ] = P7_2_10( itermax )
%P7_2_10 Calculates the growth rate and direction of the growth
%distribution vector for the number of iterations specified in itermax
%Just copy this to the working directory in matlab, and type P7_2_10(50)
%to watch it go.  You can change the initial vector by changing the vector
%in this script
A=[0 9 5;.4 0 0;0 .4 0];
x=[1 0 0]';
%this performs the first iteration outside the loop to keep it from
%dividing by zero
xnext=A*x;
x=xnext;
for n=1:1:itermax
    xnext=A*x;
    direction=xnext/xnext(3)
    growth_rate=norm(xnext)/norm(x)
    x=xnext;
end