sábado, 7 de marzo de 2015

GAUSSIANA




from pylab import *
import matplotlib.pyplot as plt
import math

def plot_gaussiana(lista_de_x,h,b,c):
y = []
for x in lista_de_x:
y.append(h*(math.e ** -(((x-b)**2)/(2*(c**2)))))


figure()
plot(lista_de_x,y,'r')
xlabel('x')
ylabel('Gausiana')
title('Funcion Gaussiana')
show()


#EL PROGRAMA ARRANCA AQUI!
puntos_en_x = linspace (0,10,100)

h = 1
b = 5
c = 1.5


plot_gaussiana(puntos_en_x,h,b,c)







No hay comentarios:

Publicar un comentario