%
%  macm 202 -- 17 mar 03 -- djm
%
%  w11lakes.m:  

nmax = 30;  A=zeros(2,nmax+1);

%  initial values
A(1,1) = 1;  A(2,1) = 1;

%  matrix

M = [.87 .38 ; .00 .62];

for n=1:nmax
    A(:,n+1) = M*A(:,n);
end  

figure(1);clf
subplot(2,1,1)
np = 0:nmax;
plot(np,A(1,:),'ro');  hold on
plot(np,A(2,:),'bx');
xlabel('\bf n-axis')
ylabel('\bf pollution index:  a_n, b_n')

subplot(2,1,2)
plot(np,2.52*(.87).^np - 1.52*(.62).^np,'ro');  hold on
xlabel('\bf n-axis')
ylabel('\bf power solutions:  a_n, b_n')
plot(np,(.62).^np,'bx');