LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
MG1_Caudal.m
1function eta=GIM1_CAUDAL(A)
2%GIM1_CAUDAL Computes the Spectral Radius of R
3%
4% eta=GIM1_CAUDAL(A) computes the dominant eigenvalue of the
5% matrix R, the smallest nonnegative solution to
6% R= A0 + R A1 + R^2 A2 + ... + R^max Amax
7
8m=size(A,1);
9dega=size(A,2)/m-1;
10
11eta_min=0;
12eta_max=1;
13eta=1/2;
14while (eta_max - eta_min > 10^(-15))
15 temp=A(:,dega*m+1:end);
16 for i=dega-1:-1:0
17 temp=temp*eta+A(:,i*m+1:(i+1)*m);
18 end
19 new_eta=max(eig(temp));
20 if (new_eta > eta)
21 eta_min=eta;
22 else
23 eta_max=eta;
24 end
25 eta=(eta_min+eta_max)/2;
26end