Skip to content

Instantly share code, notes, and snippets.

@Noob-can-Compile
Created March 31, 2020 12:58
Show Gist options
  • Save Noob-can-Compile/e591bb1ad644345c3584c4a428d00c6b to your computer and use it in GitHub Desktop.
Save Noob-can-Compile/e591bb1ad644345c3584c4a428d00c6b to your computer and use it in GitHub Desktop.
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