|
From: <br...@ph...> - 2006-06-12 19:21:53
|
r....@ma... wrote: > Results depends on the location of parameter "a" in the plot command > line. It turns out to be that the 1st plot is right, but the second plot > (just the same equation but written differently) is wrong. The cause of this probably is that you missed one important detail about gnuplot's mathematical expression syntax: just like C, it distinguishes between integers and floating-point numbers. See "help expressions" All your 'a' values are integers, and several of the constants used in the equations are, too. In particular 60/a is not what you might think it is, if 'a' is an integer. Your example boils down to this: gnuplot> a=100 gnuplot> print 60*pi/a 1.88495559215388 gnuplot> print 60/a*pi 0.0 |