From: P. K. <p.a...@go...> - 2010-10-20 12:53:21
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello! I just downloaded gnuplot 4.4 patchlevel 2 and am having the following weird problem: I have two variables V=2 and L=20 and if I try to divide V by L, the result is 0. I had to pick the whole script apart until I found it - the desired outcome of this command is of course the output 0.1. Here is the script: ####### set terminal png transparent size 1200,800 enhanced set xtics 0.1 set grid xtics ytics mxtics mytics set output 'U_vs_s.png' set key left top set key box linestyle 1 set xlabel 's' set ylabel 'U(s)' # Halfwidth of strip in m a=2 # Strip width in m w=2*a # Strip thickness in m d=2e-3 #Voltage in V V=2 # Width of simulation box in m L=20 # Speed of light in m/s c=2.99792458e8 # Permeability constant mu0=4*pi*1e-7 # Permittivity eps0=1/(mu0*(c**2)) # ANSYS fitting Kx=pi*(V/L)*eps0 KCorrX=7.293e-3 y1=(8*(c**2)) y2=(w*d) y3=V/L # Here this strange error occurs set label 'y1=%10.5e',y1 at graph 0.01, graph 0.87 set label 'y2=%10.5e',y2 at graph 0.01, graph 0.84 set label 'y3=%10.5e',y3 at graph 0.01, graph 0.81 # the former line outputs "y3=0.00000e+000" #Ky=y1/y2 KCorrY=1.413 plot 'Uac.dat' using ($1):($3) title 'data' w p 1 ####### Is this indeed a bug or am I doing something exceptionally stupid? Thanks in advance for looking into the matter. Kind regards, P. Krüger -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (MingW32) iQEcBAEBAgAGBQJMvuY1AAoJENDaZdRSuBW1MAgH+wfFxs5J8G1qyU+7qMUkvVOH Jef63XeZ0+MgRaN4yjV3ye6N/2IaT7cfj26IR71/4/mzehusoJvvM3ukl0ZEg1Sz znYMo3a6+bz6BoEi1lkPeAGnsjjtNcMdcJ7DlI5A8eYqN13jIf16yy4E0aWm+lXh vcCscYbH/I+8FIA/nAyq+e6Eig+BTvAMhC73NOWOj3qa3AO7YXYYQOMmZmv/dZet aFLov3P4WUbAi7+0/sWAOlUqbQBumHi1mvUpOvCmP6c/U99pmIeX3SSPt+niCRXv 2628lOUvB0ROi94T1HICulwy3o0MsKsFxJ1Xd5G9ryoSoH1X/q9d7xcvBoGFzLw= =E2Uo -----END PGP SIGNATURE----- |