MATLAB: How to create a Markov Matrix with variables instead of numbers for probabilities

markovmatrixstatesteadyvariables

How do I create a Markov Matrix with variables instead of numbers where the probabilities should go?

Best Answer

If your goal is to manipulate P symbolically (i.e., algebraically, rather than numerically), then you'll need to use Matlab's symbolic toolbox if you have it. In that case,
P = sym('p',[4,4]);
creates a symbolic matrix P with element (i,j) denoted by pi_j.