Advertisement
Rakoonic

Python error?

Sep 24th, 2013
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1. import math
  2. import numexpr as ne
  3. import matplotlib.pyplot as plt
  4. import numpy as np
  5. import numba as nb
  6. M = 10
  7. A = 10
  8. D = 0.1
  9. xmin = -4
  10. xmax = 4
  11. n = 800
  12. tfinal = 3
  13. tinicial = 1
  14. # GENERANDO VECTOR CON PUNTOS DE DISCRETIZACION X ESPACIADOS
  15. x= np.linspace(xmin, xmax, n)
  16. #GENERANDO FUNCION ANALITICA
  17. def Cdifuana(M,A,D,x,t):
  18.     temp = A*math.sqrt(4*math.pi*D*t);
  19.     Cdifuana = (M/temp)*math.exp(-x**2 /(4*D*t))
  20. #GENERANDO CONDICION INICIAL
  21. C=(Cdifuana(M,A,D,x,tinicial))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement