Created
March 31, 2020 12:58
-
-
Save ksheersaagr/e591bb1ad644345c3584c4a428d00c6b 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
import numpy as np | |
# define omega and xi as in the example | |
omega = np.array([[1,0,0], | |
[-1,1,0], | |
[0,-1,1]]) | |
xi = np.array([[-3], | |
[5], | |
[3]]) | |
# calculate the inverse of omega | |
omega_inv = np.linalg.inv(np.matrix(omega)) | |
# calculate the solution, mu | |
mu = omega_inv*xi | |
# print out the values of mu (x0, x1, x2) | |
print(mu) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment