%AVA3.m      12aug98 compute availability as last step
%assumes powers in this X are large enough:
X=0;
X=(P^5000+P^5001+P^5002+P^5003+P^5004)./5;
X=diag(X)';
[d2,d1]=size(X);

Up=0;Dwn=0;
for ii=1:d1 for jj=1:d1
	Up=Up+X(ii)*U(ii,jj)*P(ii,jj);
	Dwn=Dwn+X(ii)*D(ii,jj)*P(ii,jj);
end;end;

Av3=Up/(Up+Dwn);

