'How to create a signal from markov transition matrix using metropolis Algorithm?

I have a 4x4 markov transition matrix. I need to create a time series signal from this markov transition matrix. I have an idea that it can be done using metropolis algorithm. But I don't know how to code it in python. Could someone help me with this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source