LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
MG1_Decay.m
1function [eta,uT]=MG1_Decay(A)
2%MG1_Decay Computes the Decay Rate of the MG1 type MC [Falkenberg]
3%
4% eta=MG1_Decay(A) computes the decay rate of a recurrent M/G/1
5% type Markov chain, it is the unique solution of
6% PF(A0 + A1 z + A2 z^2 + ... + Amax z^max) = z on (1,RA), where
7% PF denotes the Peron-Frobenius eigenvalue.
8%
9% [eta,uT]=MG1_Decay(A) computes the decay rate of a recurrent M/G/1
10% type Markov chain and the left eigenvector corresponding to the
11% Peron-Frobenius eigenvalue of A(eta).
12
13m=size(A,1);
14dega=size(A,2)/m-1;
15
16eta=1;
17new_eta=0;
18while (new_eta - eta < 0)
19 eta=eta+1;
20 temp=A(:,dega*m+1:end);
21 for i=dega-1:-1:0
22 temp=temp*eta+A(:,i*m+1:(i+1)*m);
23 end
24 new_eta=max(eig(temp));
25end
26
27eta_min=eta-1;
28eta_max=eta;
29eta=eta_min+1/2;
30while (eta_max - eta_min > 10^(-15))
31 temp=A(:,dega*m+1:end);
32 for i=dega-1:-1:0
33 temp=temp*eta+A(:,i*m+1:(i+1)*m);
34 end
35 new_eta=max(eig(temp));
36 if (new_eta < eta)
37 eta_min=eta;
38 else
39 eta_max=eta;
40 end
41 eta=(eta_min+eta_max)/2;
42end
43
44if (nargout > 1)
45 [V,D]=eig(temp');
46 uT=V(:,find(sum(D,1)==max(sum(D,1))))';
47end