Created
October 23, 2015 13:08
-
-
Save drvinceknight/0c91130639a6bcc9e085 to your computer and use it in GitHub Desktop.
Calculate steady state
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sympy import Matrix | |
Q = [[-2, 1, 1],[3, -5, 2], [1, 1, -2]] | |
M = Matrix(Q) | |
pi = M.transpose().nullspace()[0] | |
pi = list(pi / sum(pi)) | |
print pi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment