I am trying to solve a set of equations to determine the stationary distribution of an ergodic Markov matrix.
Namely, the matrix is
P=[0 0 0 0.5 0 0.5;
0.1 0.1 0 0.4 0 0.4;
0 0.2 0.2 0.3 0 0.3;
0 0 0.3 0.5 0 0.2;
0 0 0 0.4 0.6 0;
0 0 0 0 0.4 0.6];
and the set of equations are the ones from the theorem below
How can I convert the equations above into valid Matlab syntax?
The stationary distribution is given by the left eigen vector with eigen-value 1.
>> [V D] = eig( P.' ); %// note the transpose .' - we are looking for the **left** EV
>> st = V(:,1).'; %//' the stationary distribution
st =
0.0051 0.0509 0.2291 0.6110 0.5346 0.5346
>> D(1)
1.0000