Advertisement
Sephinroth

535

Feb 26th, 2021
728
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.43 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2. import numpy as np
  3.  
  4. def P(t):
  5.     return p[n][t-delta] + delta*t(-(lambda_const + mu_const)*p[n][t - delta] + lambda_const*p[n][t - delta] + mu_const*p[n][t - delta])
  6.  
  7. lambda_const = 2
  8. mu_const = 6
  9. delta = 0.001
  10. n = 5
  11. t_finish = 10
  12.  
  13. p = []
  14. tmp = [1]
  15. for _ in np.arange(delta, t_finish, delta):
  16.     tmp.append(0)
  17. for i in range(n+1):
  18.     p.append([P(t) for t in np.arange(delta, t_finish, delta)])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement