|
From: Benny M. <ben...@gm...> - 2009-06-08 07:41:34
|
2009/6/7 Fernando Cladera <el....@gm...>:
> There was a bad indented line (t0 = tinicial)... Sorry!
> This is the code. I could add the plotting, but i couldn't draw the
> surface.
Look at the examples in the demo.py file
Benny
>
> def funhomo(x,t):
> return
> eigenvector[0,0]*cos(wfrec*t)*sin(pi*x/(2*L))+eigenvector[1,0]*cos(wfrec*t)*sin(3*pi*x/(2*L))+eigenvector[2,0]*cos(wfrec*t)*sin(5*pi*x/(2*L))
>
> it=int(raw_input("ingrese numero de puntos a obtener: "))
> xinicial=0
> tinicial=0
> hx=float(raw_input("ingrese paso de x: "))
> ht=float(raw_input("ingrese paso de t: "))
>
> funclst=[]
> x0 = xinicial
> t0 = tinicial
> for i in range(0,it+1):
> x=x0
> for j in range(0,it+1):
> t=t0
> f=funhomo(x,t)
> t0=t+ht
> print x,t,f
> funclst.append([x,t,f])
> t0 = tinicial
> x0=x+hx
> #print funclst
>
> gp = Gnuplot.Gnuplot(debug=1)
> gp.clear()
> plot1 = Gnuplot.PlotItems.Data(funclst, with_="points",
> title="Superficie")
> gp.splot(plot1)
>
> --
> Fernando Cladera <el....@gm...>
>
>
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> Gnuplot-py-users mailing list
> Gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-py-users
>
|