LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
statvec.m
1function K = statvec(A)
2% STAT(A) calculates a stationary distribution of a stochatic matrix A, i.e. a
3% left eigenvector corresponding to eigenvalue 1 with nonnegative elements
4% summing to one.
5
6% Last modification: 7th March 1997
7
8
9S = size(A,1);
10e = ones(S,1);
11B = [A - eye(S),e];
12y = [zeros(1,S),1];
13K = y / B;