title: Ergodic Markov chain stationary distribution: solving eqns
body: <p>I am trying to solve a set of equations to determine the stationary distribution of an ergodic Markov matrix.</p>
  
  <p>Namely, the matrix is </p>
  
  <pre><code>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];
  </code></pre>
  
  <p>and the set of equations are the ones from the theorem below </p>
  
  <p><img src="https://i.stack.imgur.com/INy32.png" alt=""></p>
  
  <p>How can I convert the equations above into valid Matlab syntax?</p>