% this is an example program % on how to use the function markov.m % the transition matrix p = [1 0 0 1]; % the initial prob distribution pi = [0.5 0.5]'; % the state vector c = [1 5]; [chain,state]=markov(p,10,1,c)