Created
January 26, 2016 08:19
-
-
Save limingzju/7f4237a352203d1d24a8 to your computer and use it in GitHub Desktop.
This file contains 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 * | |
n, y, u = symbols('n y u') | |
M = Matrix([[-1*n*y, n*y], [u, -u-(n-1)*y]]) | |
Mt = M.transpose() | |
X=Matrix([[1,1]]) | |
Y=Matrix([1,0]) | |
m = -X.multiply(Mt.inv()).multiply(Y) | |
r = m[0] | |
print r | |
print r.simplify() | |
print r.together().simplify() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment