title: Matlab multiply matrix M * P(n-1)
body: <p>Lets say I have a 3x3 matrix and a 3x1 vector, I want to multiply my matrix <code>A</code> with vector <code>P</code> multiple times. </p>
  
  <pre><code>A=[0 0.3 0.5; 0.8 0 0.5; 0.2 0.7 0] * P=[1; 1; 1] 
  </code></pre>
  
  <p>I want to multiply the answer of this with <code>P</code> for <code>N</code> times.</p>
  
  <p>Now I can do this by hand but I am being forced to use Matlab and it is giving me a headache.</p>
  
  <p>Cheers</p>