Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- import numpy as np
- def P(t):
- 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])
- lambda_const = 2
- mu_const = 6
- delta = 0.001
- n = 5
- t_finish = 10
- p = []
- tmp = [1]
- for _ in np.arange(delta, t_finish, delta):
- tmp.append(0)
- for i in range(n+1):
- p.append([P(t) for t in np.arange(delta, t_finish, delta)])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement