Advertisement
Sephinroth

Untitled

Mar 24th, 2021
803
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.72 KB | None | 0 0
  1. import numpy as np
  2. import matplotlib.pyplot as plt
  3. from scipy.linalg import solve
  4.  
  5. def N(lmbd, mu):
  6.     return lmbd/(mu - lmbd)
  7.  
  8. def U(lmbd, mu):
  9.     return 1/(mu - lmbd)
  10.  
  11.  
  12. L = 7
  13. lambdas0 = [4, 10, 1, 3]
  14. kappa = [1, 1, 2, 1, 4, 2, 3]
  15. mu = [4, 9, 5, 2, 5, 1, 8]
  16. Q = np.array([[0, 0.3, 0, 0.08, 0.02, 0.3, 0.2, 0],
  17.               [0, 0, 0.5, 0, 0, 0.2, 0.3, 0],
  18.               [0.04, 0.3, 0, 0.06, 0.2, 0.2, 0.2, 0],
  19.               [0, 0.8, 0, 0, 0.01, 0, 0.14, 0.05],
  20.               [0.4, 0.06, 0.02, 0.02, 0, 0.2, 0.3, 0],
  21.               [0, 0, 0.1, 0.1, 0, 0, 0.5, 0.3],
  22.               [0, 0, 0, 0.9, 0.1, 0, 0, 0],
  23.               [0.06, 0, 0, 0.6, 0.14, 0, 0.1, 0.1]])
  24.  
  25. Omega = solve(Q - np.eye(L+1), 0)
  26.  
  27. plt.plot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement