sabato 16 maggio 2009

Gaussian in python

Python implementation of gaussian:
def gauss(x):
gaussa=math.pi(2)
gaussb=math.sqrt(gaussa)
gaussc=1/gaussb
gaussd=math.exp(-0.5*-2.00**2)
gausse= gaussc*gaussd
return gausse
print gausse

from http://www.experts-exchange.com/Programming/Languages/Scripting/Python/Q_23657938.html




Nessun commento:

Posta un commento