Advertisement
Guest User

Untitled

a guest
Apr 20th, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. # Construction de l'approximation de Milstein
  2. # b ** 2 = b puissance 2
  3. Xm = X0 * np.ones(shape = (nbValeur, nbSerie))
  4. for i in range(0, nbValeur - 1, 1):
  5. Xm[i + 1, : ] = Xm[i, : ] * (1 + a * delta + b * deltaW[i, :] + 0.5 * b * b * (deltaW[i + 1, :]*deltaW[i + 1, : ]-delta))
  6.  
  7. plt.plot(t, Xm)
  8. plt.title('Solution approx')
  9. plt.xlabel('temps (s)')
  10. plt.ylabel('solutions')
  11. plt.grid()
  12. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement