rmarkov function

Generate a sample of a discrete-state Markov chain